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.performInitialExpand(root);
|
||||
})
|
||||
.catch((e) => console.error('[layout] GET_ROOT failed:', e));
|
||||
.catch((e) => console.debug('[Layout] getRoot failed:', e));
|
||||
|
||||
this.props.client.subscribe(
|
||||
this.call().INVALIDATE,
|
||||
@@ -319,7 +319,7 @@ export default class Inspector extends Component<Props, State> {
|
||||
selected: false,
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(`[Layout] Failed to fetch nodes from app:`, e);
|
||||
console.debug(`[Layout] Failed to fetch nodes from app:`, e);
|
||||
return {elements: []};
|
||||
});
|
||||
if (!elements) {
|
||||
@@ -414,10 +414,12 @@ export default class Inspector extends Component<Props, State> {
|
||||
if (!this.props.client.isConnected) {
|
||||
return;
|
||||
}
|
||||
this.props.client.call(this.call().SET_HIGHLIGHTED, {
|
||||
id: key,
|
||||
isAlignmentMode: this.props.inAlignmentMode,
|
||||
});
|
||||
this.props.client
|
||||
.call(this.call().SET_HIGHLIGHTED, {
|
||||
id: key,
|
||||
isAlignmentMode: this.props.inAlignmentMode,
|
||||
})
|
||||
.catch((e) => console.debug('[Layout] setHighlighted failed:', e));
|
||||
});
|
||||
|
||||
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) {
|
||||
this.updateElement(id, {expanded: shouldExpand});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user