File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -539,7 +539,6 @@ class ReactTooltip extends React.Component {
539539 const { delayShow, disable } = this . state ;
540540 const { afterShow } = this . props ;
541541 const placeholder = this . getTooltipContent ( ) ;
542- const delayTime = parseInt ( delayShow , 10 ) ;
543542 const eventTarget = e . currentTarget || e . target ;
544543
545544 // Check if the mouse is actually over the tooltip, if so don't hide the tooltip
@@ -552,6 +551,8 @@ class ReactTooltip extends React.Component {
552551 return ;
553552 }
554553
554+ const delayTime = ! this . state . show ? parseInt ( delayShow , 10 ) : 0 ;
555+
555556 const updateState = ( ) => {
556557 if (
557558 ( Array . isArray ( placeholder ) && placeholder . length > 0 ) ||
@@ -575,7 +576,7 @@ class ReactTooltip extends React.Component {
575576 } ;
576577
577578 clearTimeout ( this . delayShowLoop ) ;
578- if ( delayShow ) {
579+ if ( delayTime ) {
579580 this . delayShowLoop = setTimeout ( updateState , delayTime ) ;
580581 } else {
581582 updateState ( ) ;
You can’t perform that action at this time.
0 commit comments