Skip to content

Commit

Permalink
Fix linting errors in addons/update.js
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmason committed Sep 25, 2015
1 parent 64af4b5 commit c2a7552
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/addons/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ function update(value, spec) {

// not created unless needed
var nextValue;
var updatedProp;

/* get a clone of value, create if not present */
function getNextValue() {
Expand Down Expand Up @@ -168,17 +169,17 @@ function update(value, spec) {
spec[COMMAND_APPLY]
);

var updated = spec[COMMAND_APPLY](getCurrentValue());
if (updated !== getCurrentValue()) {
nextValue = updated;
updatedProp = spec[COMMAND_APPLY](getCurrentValue());
if (updatedProp !== getCurrentValue()) {
nextValue = updatedProp;
}
}

for (var k in spec) {
if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) {
var updated = update(value[k], spec[k]);
if (updated !== value[k]) {
getNextValue()[k] = updated;
updatedProp = update(value[k], spec[k]);
if (updatedProp !== value[k]) {
getNextValue()[k] = updatedProp;
}
}
}
Expand Down

0 comments on commit c2a7552

Please sign in to comment.