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

SSR HTMLDivElement is not defined in 7.0.0 #74

Closed
DoctorEaker opened this issue Jun 18, 2021 · 2 comments
Closed

SSR HTMLDivElement is not defined in 7.0.0 #74

DoctorEaker opened this issue Jun 18, 2021 · 2 comments
Labels

Comments

@DoctorEaker
Copy link

DoctorEaker commented Jun 18, 2021

I'm using Nextjs and I noticed that when I use useResizeObserver in version 7.0.0 it throws the following error:

image

But if I use version 6.1.0 it works alright
Haven't checked in other versions

@ZeeCoder
Copy link
Owner

Yeah this is related to #62
Thanks for flagging.

ZeeCoder added a commit that referenced this issue Jul 27, 2021
…cases.

Passing in a custom ref would make the hook check for `instanceof HTMLElement`,
which fails in SSR environments. (Node, JSDom)

Fixes #74 #62
github-actions bot pushed a commit that referenced this issue Jul 27, 2021
## [7.0.1](v7.0.0...v7.0.1) (2021-07-27)

### Bug Fixes

* Removed unnecessary entries.length check ([3211d33](3211d33))
* Undefined HTMLElement is no longer an issue in certain SSR edge cases. ([599cace](599cace)), closes [#74](#74) [#62](#62)
@github-actions
Copy link

🎉 This issue has been resolved in version 7.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

No branches or pull requests

2 participants