Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kamontat committed Jan 21, 2021
1 parent 683a563 commit 3ae2d4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plugin/duration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class Duration {
} else {
base = this.$d[pUnit]
}
return Object.is(base, -0) ? 0 : base
return base === 0 ? 0 : base // a === 0 will be true on both 0 and -0
}

add(input, unit, isSubtract) {
Expand Down

0 comments on commit 3ae2d4b

Please sign in to comment.