Skip to content

Commit

Permalink
jshint flxes for assignment of values
Browse files Browse the repository at this point in the history
i18n.js: line 619, col 57, Did you mean to return a conditional instead
of an assignment? (W093)
i18n.js: line 636, col 41, Did you mean to return a conditional instead
of an assignment? (W093)
  • Loading branch information
Travis Nelson committed Oct 28, 2015
1 parent 2687f90 commit 42a128a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,8 @@ function localeMutator(locale,singular,allowBranching) {
}
}
// Generate a mutator for the current level.
accessor = function(value){ return object[index] = value; };
accessor = function(value){ object[index] = value; return value; };

// Return a reference to the next deeper level in the locale tree.
return object[index];

Expand All @@ -633,7 +634,8 @@ function localeMutator(locale,singular,allowBranching) {
} else {
// No object notation, just return a mutator that performs array lookup and changes the value.
return function(value){
return locales[locale][singular] = value;
locales[locale][singular] = value;
return value;
};
}
}
Expand Down

0 comments on commit 42a128a

Please sign in to comment.