mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 17:46:56 +03:00
ignored undefined nodes in array/objects
This commit is contained in:
parent
626562ad5a
commit
65d9e5831b
|
@ -61,7 +61,10 @@ export default class JSONArrayNode extends React.Component {
|
||||||
if (typeof this.props.previousData !== 'undefined') {
|
if (typeof this.props.previousData !== 'undefined') {
|
||||||
prevData = this.props.previousData[idx];
|
prevData = this.props.previousData[idx];
|
||||||
}
|
}
|
||||||
childNodes.push(grabNode(idx, element, prevData, this.props.theme));
|
const node = grabNode(idx, element, prevData, this.props.theme);
|
||||||
|
if (node !== false) {
|
||||||
|
childNodes.push(node);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.needsChildNodes = false;
|
this.needsChildNodes = false;
|
||||||
this.renderedChildren = childNodes;
|
this.renderedChildren = childNodes;
|
||||||
|
|
|
@ -62,7 +62,10 @@ export default class JSONObjectNode extends React.Component {
|
||||||
if (typeof this.props.previousData !== 'undefined') {
|
if (typeof this.props.previousData !== 'undefined') {
|
||||||
prevData = this.props.previousData[k];
|
prevData = this.props.previousData[k];
|
||||||
}
|
}
|
||||||
childNodes.push(grabNode(k, obj[k], prevData, this.props.theme));
|
const node = grabNode(k, obj[k], prevData, this.props.theme);
|
||||||
|
if (node !== false) {
|
||||||
|
childNodes.push(node);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.needsChildNodes = false;
|
this.needsChildNodes = false;
|
||||||
|
|
|
@ -23,6 +23,5 @@ export default function(key, value, prevValue, theme) {
|
||||||
} else if (nodeType === 'Null') {
|
} else if (nodeType === 'Null') {
|
||||||
return <JSONNullNode keyName={key} previousValue={prevValue} theme={theme} value={value} key={aKey} />;
|
return <JSONNullNode keyName={key} previousValue={prevValue} theme={theme} value={value} key={aKey} />;
|
||||||
}
|
}
|
||||||
console.error('Unknown node type:', nodeType);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user