Skip to content

Commit cc3c003

Browse files
committed
fixed #37
1 parent eae41fc commit cc3c003

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/extension/components/ReactPerfDevtool.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class ReactPerfDevtool extends React.Component {
7676
}
7777

7878
componentWillUnmount() {
79-
clearInterval(this.timer)
79+
this.timer && clearInterval(this.timer)
8080
}
8181

8282
reloadInspectedWindow = () => chrome.devtools.inspectedWindow.reload()
@@ -252,6 +252,9 @@ export class ReactPerfDevtool extends React.Component {
252252
})
253253

254254
this.clearMeasures()
255+
256+
// Makes sure that we are not batching calls for example - setting chart state here false and batching drawChart may result in an error because the canvas may not render.
257+
this.timer && clearInterval(this.timer)
255258
}
256259

257260
browserReload = () =>

0 commit comments

Comments
 (0)