Skip to content

Commit

Permalink
Fix memory leak in demo site (#921)
Browse files Browse the repository at this point in the history
* Fix memory leak in demo site

* fix
  • Loading branch information
JiuqingSong authored Apr 22, 2022
1 parent 91ae56f commit 4b6ce6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo/scripts/controls/sidePane/SidePane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ export default class SidePane extends React.Component<SidePaneProps, SidePaneSta
this.updateStateFromHash();
}

componentWillUnmount() {
window.removeEventListener('hashchange', this.updateStateFromHash);
}

render() {
let className = (this.props.className || '') + ' ' + styles.sidePane;
return (
Expand Down

0 comments on commit 4b6ce6e

Please sign in to comment.