From 647dbfb2e8ab9487c802ef1e1cc8cb883c290c2c Mon Sep 17 00:00:00 2001 From: Klathmon Date: Mon, 13 Jun 2016 16:50:48 -0400 Subject: [PATCH] clear the timeout on componentWillUnmount --- components/snackbar/Snackbar.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/snackbar/Snackbar.js b/components/snackbar/Snackbar.js index 033d3309..79f30f74 100644 --- a/components/snackbar/Snackbar.js +++ b/components/snackbar/Snackbar.js @@ -44,6 +44,10 @@ const factory = (Overlay, Button) => { } } + componentWillUnmount () { + clearTimeout(this.curTimeout); + } + render () { const {action, active, icon, label, onClick, theme, type } = this.props; const className = classnames([theme.snackbar, theme[type]], {