Skip to content

Commit

Permalink
fix: fix duration when creating with partial object parameter (#2633)
Browse files Browse the repository at this point in the history
The Duration creator returned incomplete duration if passed the object parameter that's partial.
  • Loading branch information
jalooc authored Apr 28, 2024
1 parent 3737c8c commit 519ae3d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/plugin/duration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class Duration {
this.$d[prettyUnit(k)] = input[k]
})
this.calMilliseconds()
this.parseFromMilliseconds()
return this
}
if (typeof input === 'string') {
Expand Down

0 comments on commit 519ae3d

Please sign in to comment.