Skip to content

Commit 7fc2ba8

Browse files
fix: Fix disposing of the state visualizer
1 parent 37a4244 commit 7fc2ba8

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/statevis/StateVisualizer.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,11 @@ export class StateVisualizer extends Component<IProps, IState> {
107107
return element;
108108
}
109109

110-
el: HTMLElement;
110+
rootEl: HTMLElement;
111111
windowEl: HTMLElement;
112112

113113
dispose() {
114-
let Nothing = () => null;
115-
render(h(Nothing as any, null), document.body, this.el);
114+
render(null, document.getElementById('uirStateVisualizer'), this.rootEl);
116115
}
117116

118117
handleRendererChange(renderer: Renderer) {
@@ -153,7 +152,7 @@ export class StateVisualizer extends Component<IProps, IState> {
153152
const { minimized } = this.state;
154153
return (
155154
<div
156-
ref={(el) => (this.el = el as HTMLElement)}
155+
ref={(el) => (this.rootEl = el as HTMLElement)}
157156
onMouseDown={this.cancelAutoMinimize.bind(this)}
158157
onMouseEnter={this.cancelAutoMinimize.bind(this)}
159158
>

0 commit comments

Comments
 (0)