From 80473b902f61e85b1f27f818e4310cf09efc0465 Mon Sep 17 00:00:00 2001 From: Monterra Date: Wed, 20 Jan 2016 20:27:43 +0100 Subject: [PATCH] clearing delayShowLoop-Timeout when component will unmount --- dist/react-tooltip.js | 1 + src/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/react-tooltip.js b/dist/react-tooltip.js index 79c4165bc..fdcb1347e 100644 --- a/dist/react-tooltip.js +++ b/dist/react-tooltip.js @@ -148,6 +148,7 @@ var ReactTooltip = (function (_Component) { }; ReactTooltip.prototype.componentWillUnmount = function componentWillUnmount() { + clearTimeout(this.delayShowLoop); this.unbindListener(); this.removeScrollListener(); this.mount = false; diff --git a/src/index.js b/src/index.js index 93868c664..c2bde3de4 100644 --- a/src/index.js +++ b/src/index.js @@ -107,6 +107,7 @@ export default class ReactTooltip extends Component { } componentWillUnmount () { + clearTimeout(this.delayShowLoop) this.unbindListener() this.removeScrollListener() this.mount = false