Fix crash on missing children
Summary: T98487412 is firing again. This seems to be an expected case that's not handled correctly. thinkofthechildren Reviewed By: fabiomassimo Differential Revision: D30539615 fbshipit-source-id: d9625bb0a7b3622e5afb6e768bc525c27fdfb02d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
87580c4147
commit
b601ff5a09
@@ -299,7 +299,8 @@ export default class Inspector extends Component<Props, State> {
|
|||||||
await this.getNodes([id], options);
|
await this.getNodes([id], options);
|
||||||
}
|
}
|
||||||
this.updateElement(id, {expanded: true});
|
this.updateElement(id, {expanded: true});
|
||||||
return this.getNodes(this.elements()[id].children, options);
|
const element: Element | undefined = this.elements()[id];
|
||||||
|
return this.getNodes((element && element.children) || [], options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getNodes(
|
async getNodes(
|
||||||
|
|||||||
Reference in New Issue
Block a user