Skip to content

Commit

Permalink
fix[ReactDevToolsViewBase]: observe model from constructor (#112)
Browse files Browse the repository at this point in the history
* fix[react-devtools]: initialize bridge only after domain is ready

* fix: apply eslint suggestions

* fix[ReactDevToolsViewBase]: observe model from constructor
  • Loading branch information
hoxyq authored Sep 9, 2024
1 parent 3a496f2 commit c4c9edf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions front_end/panels/react_devtools/ReactDevToolsViewBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ export class ReactDevToolsViewBase extends UI.View.SimpleView implements

this.#tab = tab;
this.#renderLoader();

SDK.TargetManager.TargetManager.instance().observeModels(ReactDevToolsModel, this);
}

override wasShown(): void {
super.wasShown();
this.registerCSSFiles([ReactDevTools.CSS]);

if (this.#model === null) {
SDK.TargetManager.TargetManager.instance().observeModels(ReactDevToolsModel, this);
}
}

modelAdded(model: ReactDevToolsModel): void {
Expand Down

0 comments on commit c4c9edf

Please sign in to comment.