Add native tree information in sidebar

Summary: This diff adds the native tree information in the side bar. It reuses the the Layout Plugins Inspector Sidebar UI.

Reviewed By: timur-valiev

Differential Revision: D27387714

fbshipit-source-id: 46941fdaaaf9fea78dab32f0f8bf7b3dec8286c6
This commit is contained in:
Pritesh Nandgaonkar
2021-03-29 05:08:41 -07:00
committed by Facebook GitHub Bot
parent ed57f97720
commit 2132163d20

View File

@@ -107,8 +107,11 @@ export class InspectorSidebar extends Component<Props, State> {
}
}
checkIfConsoleIsEnabled() {
if (this.props.client.isConnected) {
async checkIfConsoleIsEnabled() {
if (
this.props.client.isConnected &&
(await this.props.client.supportsMethod('isConsoleEnabled'))
) {
this.props.client
.call('isConsoleEnabled')
.then((result: {isEnabled: boolean}) => {