Skip to content

Commit

Permalink
fix: add validation before call callbackAfter function as function
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbarion committed Oct 13, 2022
1 parent c560036 commit aae936e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,9 @@ class ReactTooltip extends React.Component {
});
}

if (callbackAfter && typeof callbackAfter === 'function') {
callbackAfter();
}

// Set tooltip position
node.style.left = result.position.left + 'px';
Expand Down

0 comments on commit aae936e

Please sign in to comment.