Skip to content

Commit df8a8b2

Browse files
committed
forget to deploy 0.6.1
1 parent ca110b0 commit df8a8b2

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

dist/react-tooltip.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ var ReactTooltip = (function (_Component) {
6464

6565
_Component.call(this, props);
6666
this._bind('showTooltip', 'updateTooltip', 'hideTooltip');
67+
this.mount = true;
6768
this.state = {
6869
show: false,
6970
multilineCount: 0,
@@ -90,16 +91,21 @@ var ReactTooltip = (function (_Component) {
9091
**/
9192

9293
ReactTooltip.prototype.globalHide = function globalHide() {
93-
this.hideTooltip();
94+
if (this.mount) {
95+
this.hideTooltip();
96+
}
9497
};
9598

9699
ReactTooltip.prototype.globalRebuild = function globalRebuild() {
97-
this.unbindListener();
98-
this.bindListener();
100+
if (this.mount) {
101+
this.unbindListener();
102+
this.bindListener();
103+
}
99104
};
100105

101106
ReactTooltip.prototype.componentWillUnmount = function componentWillUnmount() {
102107
this.unbindListener();
108+
this.mount = false;
103109
var tag = document.querySelector('style[id="react-tooltip"]');
104110
document.getElementsByTagName('head')[0].removeChild(tag);
105111
window.removeEventListener('__react_tooltip_hide_event', this.globalHide);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tooltip",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"description": "react tooltip component",
55
"main": "dist/react-tooltip.js",
66
"scripts": {

0 commit comments

Comments
 (0)