Skip to content

Commit e12f025

Browse files
committed
fix(ToastMessage): need clear setTimeout when component unmount
* Original commit: 737d5f4 * Original author: @bluedarker * Closes #29
1 parent 8d5c0f2 commit e12f025

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/ToastMessage/animationMixin.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ module.exports = {
4343
);
4444
}
4545
},
46-
46+
componentWillUnmount() {
47+
if(this.intervalId){
48+
clearTimeout(this.intervalId);
49+
}
50+
},
4751
_set_transition(hide) {
4852
var animationType = hide ? "leave" : "enter";
4953
var node = this.getDOMNode();

0 commit comments

Comments
 (0)