Skip to content

Commit

Permalink
[misc] Remove unused variable defaults (#4959)
Browse files Browse the repository at this point in the history
The default values of the initialized fields are overwritten in the following lines. This means that the code never relies on the variable defaults.
Removing the unused defaults makes the code easier to read.
  • Loading branch information
ronnyroeller authored and marwahaha committed Jan 21, 2019
1 parent 24e55df commit 01ae8ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/duration/create.js
Expand Up @@ -90,7 +90,7 @@ function parseIso (inp, sign) {
}

function positiveMomentsDifference(base, other) {
var res = {milliseconds: 0, months: 0};
var res = {};

res.months = other.month() - base.month() +
(other.year() - base.year()) * 12;
Expand Down

0 comments on commit 01ae8ca

Please sign in to comment.