File tree 1 file changed +20
-5
lines changed
1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -587,10 +587,13 @@ class ReactTooltip extends React.Component {
587
587
}
588
588
} ;
589
589
590
- clearTimeout ( this . delayShowLoop ) ;
590
+ if ( this . delayShowLoop ) {
591
+ clearTimeout ( this . delayShowLoop ) ;
592
+ }
591
593
if ( delayTime ) {
592
594
this . delayShowLoop = setTimeout ( updateState , delayTime ) ;
593
595
} else {
596
+ this . delayShowLoop = null ;
594
597
updateState ( ) ;
595
598
}
596
599
}
@@ -737,10 +740,22 @@ class ReactTooltip extends React.Component {
737
740
* CLear all kinds of timeout of interval
738
741
*/
739
742
clearTimer ( ) {
740
- clearTimeout ( this . delayShowLoop ) ;
741
- clearTimeout ( this . delayHideLoop ) ;
742
- clearTimeout ( this . delayReshow ) ;
743
- clearInterval ( this . intervalUpdateContent ) ;
743
+ if ( this . delayShowLoop ) {
744
+ clearTimeout ( this . delayShowLoop ) ;
745
+ this . delayShowLoop = null ;
746
+ }
747
+ if ( this . delayHideLoop ) {
748
+ clearTimeout ( this . delayHideLoop ) ;
749
+ this . delayHideLoop = null ;
750
+ }
751
+ if ( this . delayReshow ) {
752
+ clearTimeout ( this . delayReshow ) ;
753
+ this . delayReshow = null ;
754
+ }
755
+ if ( this . intervalUpdateContent ) {
756
+ clearInterval ( this . intervalUpdateContent ) ;
757
+ this . intervalUpdateContent = null ;
758
+ }
744
759
}
745
760
746
761
hasCustomColors ( ) {
You can’t perform that action at this time.
0 commit comments