Fix NPE in LayoutInspector
Summary: Fixed a potential NPE that could happen in layout editor. Reviewed By: passy Differential Revision: D30870185 fbshipit-source-id: 3ae5860ce63761336d8bc508dd8eff761a5ab1f8
This commit is contained in:
committed by
Facebook GitHub Bot
parent
977cc7598e
commit
5fb23f83e9
@@ -318,6 +318,9 @@ export default class Inspector extends Component<Props, State> {
|
||||
forAccessibilityEvent,
|
||||
selected: false,
|
||||
});
|
||||
if (!elements) {
|
||||
return [];
|
||||
}
|
||||
elements.forEach((e) => this.updateElement(e.id, e));
|
||||
return elements;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user