Skip to content

Commit 6f9b11e

Browse files
committed
Use curly braces
1 parent 1ed03b3 commit 6f9b11e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/ObjectStateMutations.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ function nestedSet(obj, key, value) {
160160
if (!(path[i] in obj)) obj[path[i]] = {};
161161
obj = obj[path[i]];
162162
}
163-
if (typeof value === 'undefined') delete obj[path[path.length - 1]];
164-
else obj[path[path.length - 1]] = value;
163+
if (typeof value === 'undefined') {
164+
delete obj[path[path.length - 1]];
165+
} else {
166+
obj[path[path.length - 1]] = value;
167+
}
165168
}
166169

167170
export function commitServerChanges(

0 commit comments

Comments
 (0)