Skip to content

Commit

Permalink
fix(ToastMessage): need clear setTimeout when component unmount
Browse files Browse the repository at this point in the history
* Original commit: 737d5f4
* Original author: @bluedarker
* Closes #29
  • Loading branch information
tomchentw committed Sep 25, 2015
1 parent 8d5c0f2 commit e12f025
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ToastMessage/animationMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ module.exports = {
);
}
},

componentWillUnmount() {
if(this.intervalId){
clearTimeout(this.intervalId);
}
},
_set_transition(hide) {
var animationType = hide ? "leave" : "enter";
var node = this.getDOMNode();
Expand Down

0 comments on commit e12f025

Please sign in to comment.