Add a handler for any errors during highlight
Summary: ^ Ignore the errors as otherwise it may cause unhandled rejection errors. Reviewed By: aigoncharov Differential Revision: D37926740 fbshipit-source-id: 50476378b4d254e28af953979fbedad1113e43aa
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bc74a58aab
commit
d4597f455e
@@ -128,7 +128,7 @@ export default class Inspector extends Component<Props, State> {
|
|||||||
this.updateElement(root.id, {...root, expanded: true});
|
this.updateElement(root.id, {...root, expanded: true});
|
||||||
this.performInitialExpand(root);
|
this.performInitialExpand(root);
|
||||||
})
|
})
|
||||||
.catch((e) => console.error('[layout] GET_ROOT failed:', e));
|
.catch((e) => console.debug('[Layout] getRoot failed:', e));
|
||||||
|
|
||||||
this.props.client.subscribe(
|
this.props.client.subscribe(
|
||||||
this.call().INVALIDATE,
|
this.call().INVALIDATE,
|
||||||
@@ -319,7 +319,7 @@ export default class Inspector extends Component<Props, State> {
|
|||||||
selected: false,
|
selected: false,
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(`[Layout] Failed to fetch nodes from app:`, e);
|
console.debug(`[Layout] Failed to fetch nodes from app:`, e);
|
||||||
return {elements: []};
|
return {elements: []};
|
||||||
});
|
});
|
||||||
if (!elements) {
|
if (!elements) {
|
||||||
@@ -414,10 +414,12 @@ export default class Inspector extends Component<Props, State> {
|
|||||||
if (!this.props.client.isConnected) {
|
if (!this.props.client.isConnected) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.props.client.call(this.call().SET_HIGHLIGHTED, {
|
this.props.client
|
||||||
id: key,
|
.call(this.call().SET_HIGHLIGHTED, {
|
||||||
isAlignmentMode: this.props.inAlignmentMode,
|
id: key,
|
||||||
});
|
isAlignmentMode: this.props.inAlignmentMode,
|
||||||
|
})
|
||||||
|
.catch((e) => console.debug('[Layout] setHighlighted failed:', e));
|
||||||
});
|
});
|
||||||
|
|
||||||
onElementExpanded = (
|
onElementExpanded = (
|
||||||
@@ -437,7 +439,7 @@ export default class Inspector extends Component<Props, State> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((e) => console.error('[layout] getChildren failed:', e));
|
.catch((e) => console.debug('[Layout] getChildren failed:', e));
|
||||||
if (!shouldExpand) {
|
if (!shouldExpand) {
|
||||||
this.updateElement(id, {expanded: shouldExpand});
|
this.updateElement(id, {expanded: shouldExpand});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user