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 @@ -591,10 +591,13 @@ class ReactTooltip extends React.Component {
591
591
}
592
592
} ;
593
593
594
- clearTimeout ( this . delayShowLoop ) ;
594
+ if ( this . delayShowLoop ) {
595
+ clearTimeout ( this . delayShowLoop ) ;
596
+ }
595
597
if ( delayTime ) {
596
598
this . delayShowLoop = setTimeout ( updateState , delayTime ) ;
597
599
} else {
600
+ this . delayShowLoop = null ;
598
601
updateState ( ) ;
599
602
}
600
603
}
@@ -743,10 +746,22 @@ class ReactTooltip extends React.Component {
743
746
* CLear all kinds of timeout of interval
744
747
*/
745
748
clearTimer ( ) {
746
- clearTimeout ( this . delayShowLoop ) ;
747
- clearTimeout ( this . delayHideLoop ) ;
748
- clearTimeout ( this . delayReshow ) ;
749
- clearInterval ( this . intervalUpdateContent ) ;
749
+ if ( this . delayShowLoop ) {
750
+ clearTimeout ( this . delayShowLoop ) ;
751
+ this . delayShowLoop = null ;
752
+ }
753
+ if ( this . delayHideLoop ) {
754
+ clearTimeout ( this . delayHideLoop ) ;
755
+ this . delayHideLoop = null ;
756
+ }
757
+ if ( this . delayReshow ) {
758
+ clearTimeout ( this . delayReshow ) ;
759
+ this . delayReshow = null ;
760
+ }
761
+ if ( this . intervalUpdateContent ) {
762
+ clearInterval ( this . intervalUpdateContent ) ;
763
+ this . intervalUpdateContent = null ;
764
+ }
750
765
}
751
766
752
767
hasCustomColors ( ) {
You can’t perform that action at this time.
0 commit comments