Skip to content

element-closest causes issues in isomorphic application #37

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

Closed
mmoyles87 opened this issue Sep 19, 2018 · 4 comments
Closed

element-closest causes issues in isomorphic application #37

mmoyles87 opened this issue Sep 19, 2018 · 4 comments

Comments

@mmoyles87
Copy link

The package element-closest causes issues in an isomorphic application because the server does not have window.Element.

There is a fix which makes element-closest a no-op on the server side ->
"element-closest": "github:ptolemybarnes/closest",

@fitzez
Copy link

fitzez commented Oct 22, 2018

Have you found a work around for this @dubvfan87? My Nextjs app crashes even when I dynamically import components that use element-closest and also only render when I've check for typeof window !== "undefined".

This was referenced Dec 20, 2018
@xidedix
Copy link
Member

xidedix commented Dec 21, 2018

hi @dubvfan87 @fitz-ez
please update @coreui/react to v2.1.2 and let us know if this works for you

@raitucarp
Copy link

getComputedStyle not working in SSR especially Next.js

@woothu woothu closed this as completed Jun 24, 2020
@woothu
Copy link

woothu commented Jun 24, 2020

The issue should be solved in version 3

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

5 participants