Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.

Commit c5f3b6b

Browse files
Fixes objects without prototype
Works as intended. Suggested by @skleeschulte
1 parent 516b859 commit c5f3b6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JSONObjectNode.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ function getChildNodes({
2929
}) {
3030
const childNodes = [];
3131
for (let key in data) {
32-
if (data.hasOwnProperty(key)) {
32+
if (Object.getPrototypeOf(data) === null || data.hasOwnProperty(key)) {
3333
let previousDataValue;
3434
if (typeof previousData !== 'undefined' && previousData !== null) {
3535
previousDataValue = previousData[key];

0 commit comments

Comments
 (0)