Skip to content
This repository has been archived by the owner on Nov 9, 2024. It is now read-only.

Commit

Permalink
Use state.isMounted over state.isVisible in destroy()
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiks committed Nov 14, 2018
1 parent 82be626 commit 6bf1552
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/js/createTippy.js
Original file line number Diff line number Diff line change
Expand Up @@ -993,8 +993,9 @@ export default function createTippy(reference, collectionProps) {
return
}

// Ensure the popper is hidden
if (tip.state.isVisible) {
// If the popper is currently mounted to the DOM, we want to ensure it gets
// hidden and unmounted instantly upon destruction
if (tip.state.isMounted) {
hide(0)
}

Expand Down

0 comments on commit 6bf1552

Please sign in to comment.