Skip to content

Commit 647dbfb

Browse files
committed
clear the timeout on componentWillUnmount
1 parent afde8b1 commit 647dbfb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/snackbar/Snackbar.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const factory = (Overlay, Button) => {
4444
}
4545
}
4646

47+
componentWillUnmount () {
48+
clearTimeout(this.curTimeout);
49+
}
50+
4751
render () {
4852
const {action, active, icon, label, onClick, theme, type } = this.props;
4953
const className = classnames([theme.snackbar, theme[type]], {

0 commit comments

Comments
 (0)