Skip to content

Commit 815f841

Browse files
authored
Merge pull request #363 from FormidableLabs/bug/object-keys
compensate for Object.keys
2 parents 74b485b + 79c5127 commit 815f841

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/victory-util/events.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default {
120120
const childState = baseState[childName] || {};
121121

122122
const filterState = (state) => {
123-
const stateTargets = Object.keys(state[key]);
123+
const stateTargets = state[key] ? Object.keys(state[key]) : [];
124124
if (target === "parent" || stateTargets.length === 1 && stateTargets[0] === target) {
125125
delete state[key];
126126
return state;

0 commit comments

Comments
 (0)