Skip to content

Commit

Permalink
Fix set scope test.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmackrodt committed Jan 10, 2019
1 parent 0cdf8a4 commit 151f1d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function setProperty<TScope, TState extends Record<string, any>>(
result = { [key]: { ...current, ...value } };
} else {
result = {
[key]: { ...current, ...setProperty(current, path, index++, value) },
[key]: { ...current, ...setProperty(current, path, ++index, value) },
};
}

Expand All @@ -59,7 +59,7 @@ export function getProperty<TScope, TState extends Record<string, any>>(
if (path.length - 1 <= index) {
return state[key!];
}
return getProperty(state[key!], path, index++);
return getProperty(state[key!], path, ++index);
}

export function getScope<TState extends Record<string, any>, TScope>(
Expand Down

0 comments on commit 151f1d9

Please sign in to comment.