Skip to content

Commit

Permalink
Fix issue with component calling setState after unmounting
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Feb 15, 2018
1 parent b2179a6 commit ffe0fb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/delay_hide/delay_hide.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export class EuiDelayHide extends Component {
return this.shouldRender;
}

componentWillUnmount() {
clearTimeout(this.timeout);
}

render() {
if (this.state.hide) {
return null;
Expand Down

0 comments on commit ffe0fb7

Please sign in to comment.