Skip to content

Commit 7c04a3b

Browse files
committed
Merge pull request #254 from ParsePlatform/patch_traverse
Ensure traverse is only called on objects
2 parents 7df6834 + 7bd6937 commit 7c04a3b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/unsavedChildren.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ function traverse(
8484
}
8585
if (Array.isArray(obj)) {
8686
obj.forEach((el) => {
87-
traverse(el, encountered, shouldThrow, allowDeepUnsaved);
87+
if (typeof el === 'object') {
88+
traverse(el, encountered, shouldThrow, allowDeepUnsaved);
89+
}
8890
});
8991
}
9092
for (var k in obj) {

0 commit comments

Comments
 (0)