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

Commit

Permalink
Merge pull request #23 from martinhoefling/patch-2
Browse files Browse the repository at this point in the history
Fixes objects without prototype
  • Loading branch information
chibicode committed Jan 12, 2016
2 parents 0acf744 + c5f3b6b commit c4beaf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JSONObjectNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function getChildNodes({
}) {
const childNodes = [];
for (let key in data) {
if (data.hasOwnProperty(key)) {
if (Object.getPrototypeOf(data) === null || data.hasOwnProperty(key)) {
let previousDataValue;
if (typeof previousData !== 'undefined' && previousData !== null) {
previousDataValue = previousData[key];
Expand Down

0 comments on commit c4beaf8

Please sign in to comment.