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 @@ -587,10 +587,13 @@ class ReactTooltip extends React.Component {
587587 }
588588 } ;
589589
590- clearTimeout ( this . delayShowLoop ) ;
590+ if ( this . delayShowLoop ) {
591+ clearTimeout ( this . delayShowLoop ) ;
592+ }
591593 if ( delayTime ) {
592594 this . delayShowLoop = setTimeout ( updateState , delayTime ) ;
593595 } else {
596+ this . delayShowLoop = null ;
594597 updateState ( ) ;
595598 }
596599 }
@@ -737,10 +740,22 @@ class ReactTooltip extends React.Component {
737740 * CLear all kinds of timeout of interval
738741 */
739742 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+ }
744759 }
745760
746761 hasCustomColors ( ) {
You can’t perform that action at this time.
0 commit comments