mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2024-11-22 09:36:43 +03:00
Fix for issue #83 - JSONObjectNode#getChildNodes: Cannot read property '...' of null (previousData)
This commit is contained in:
parent
4670a825d0
commit
b5a878df87
|
@ -58,7 +58,7 @@ export default class JSONArrayNode extends React.Component {
|
||||||
let childNodes = [];
|
let childNodes = [];
|
||||||
this.props.data.forEach((element, idx) => {
|
this.props.data.forEach((element, idx) => {
|
||||||
let prevData;
|
let prevData;
|
||||||
if (typeof this.props.previousData !== 'undefined') {
|
if (typeof this.props.previousData !== 'undefined' && this.props.previousData !== null) {
|
||||||
prevData = this.props.previousData[idx];
|
prevData = this.props.previousData[idx];
|
||||||
}
|
}
|
||||||
const node = grabNode(idx, element, prevData, this.props.theme);
|
const node = grabNode(idx, element, prevData, this.props.theme);
|
||||||
|
|
|
@ -67,7 +67,7 @@ export default class JSONIterableNode extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
let prevData;
|
let prevData;
|
||||||
if (typeof this.props.previousData !== 'undefined') {
|
if (typeof this.props.previousData !== 'undefined' && this.props.previousData !== null) {
|
||||||
prevData = this.props.previousData[key];
|
prevData = this.props.previousData[key];
|
||||||
}
|
}
|
||||||
const node = grabNode(key, value, prevData, this.props.theme);
|
const node = grabNode(key, value, prevData, this.props.theme);
|
||||||
|
|
|
@ -58,7 +58,7 @@ export default class JSONObjectNode extends React.Component {
|
||||||
for (let k in obj) {
|
for (let k in obj) {
|
||||||
if (obj.hasOwnProperty(k)) {
|
if (obj.hasOwnProperty(k)) {
|
||||||
let prevData;
|
let prevData;
|
||||||
if (typeof this.props.previousData !== 'undefined') {
|
if (typeof this.props.previousData !== 'undefined' && this.props.previousData !== null) {
|
||||||
prevData = this.props.previousData[k];
|
prevData = this.props.previousData[k];
|
||||||
}
|
}
|
||||||
const node = grabNode(k, obj[k], prevData, this.props.theme);
|
const node = grabNode(k, obj[k], prevData, this.props.theme);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user