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

passing undefined to onHidden prop causes error to be thrown when unmounting #353

Open
HenryMorgan-cd2 opened this issue Mar 5, 2022 · 0 comments

Comments

@HenryMorgan-cd2
Copy link

If you pass undefined to the onHidden prop, then whenever the popout is unmounted it will throw an error.

<Tippy onHidden={undefined} content="CONTENT">
  <div>Tooltip</div>
</Tippy>
tippy.esm.js:741 Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
    at invokeHook (tippy.esm.js:741:1)
    at unmount (tippy.esm.js:1523:1)
    at tippy.esm.js:866:1
    at HTMLDivElement.listener (tippy.esm.js:881:1)
invokeHook @ tippy.esm.js:741
unmount @ tippy.esm.js:1523
(anonymous) @ tippy.esm.js:866
listener @ tippy.esm.js:881

Additionally, if you have a trigger="click" popout and then you unmount the component whilst the popout is open, it causes the page to crash - though, I think this is related though as the error is similar.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant