Skip to content

Commit aae936e

Browse files
committed
fix: add validation before call callbackAfter function as function
1 parent c560036 commit aae936e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,9 @@ class ReactTooltip extends React.Component {
741741
});
742742
}
743743

744+
if (callbackAfter && typeof callbackAfter === 'function') {
744745
callbackAfter();
746+
}
745747

746748
// Set tooltip position
747749
node.style.left = result.position.left + 'px';

0 commit comments

Comments
 (0)