Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant