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

Commit c4beaf8

Browse files
committed
Merge pull request #23 from martinhoefling/patch-2
Fixes objects without prototype
2 parents 0acf744 + c5f3b6b commit c4beaf8

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)