Skip to content

Commit

Permalink
Use curly braces
Browse files Browse the repository at this point in the history
  • Loading branch information
mstniy committed May 14, 2021
1 parent 1ed03b3 commit 6f9b11e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/ObjectStateMutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,11 @@ function nestedSet(obj, key, value) {
if (!(path[i] in obj)) obj[path[i]] = {};
obj = obj[path[i]];
}
if (typeof value === 'undefined') delete obj[path[path.length - 1]];
else obj[path[path.length - 1]] = value;
if (typeof value === 'undefined') {
delete obj[path[path.length - 1]];
} else {
obj[path[path.length - 1]] = value;
}
}

export function commitServerChanges(
Expand Down

0 comments on commit 6f9b11e

Please sign in to comment.