File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Expand file tree Collapse file tree 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 {
591591 }
592592 } ;
593593
594- clearTimeout ( this . delayShowLoop ) ;
594+ if ( this . delayShowLoop ) {
595+ clearTimeout ( this . delayShowLoop ) ;
596+ }
595597 if ( delayTime ) {
596598 this . delayShowLoop = setTimeout ( updateState , delayTime ) ;
597599 } else {
600+ this . delayShowLoop = null ;
598601 updateState ( ) ;
599602 }
600603 }
@@ -743,10 +746,22 @@ class ReactTooltip extends React.Component {
743746 * CLear all kinds of timeout of interval
744747 */
745748 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+ }
750765 }
751766
752767 hasCustomColors ( ) {
You can’t perform that action at this time.
0 commit comments