-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
vendor/detectElementResize: fix window check for SSR #945
Conversation
'this' is undefined at this point, so you will get errors like `Cannot read property 'requestAnimationFrame' of undefined` when assigning to variable `raf` on the server.
Thanks |
Does this only happen in the newer node versions? |
@jayaram171992 This will happen with es modules support and may happen with bundled version now because this is replaced with undefined. |
I upgraded from 9.10.1 to 9.15 and saw this issue, after upgrading to 9.16 seeing this. Not sure if they are related. Still trying to figure out whats going on currently
|
If it helps, I downgraded to 9.10 and dont see this error. 9.16 has the above error for SSR |
@TrySound thanks 😄 |
@jayaram171992 Do you get the same error with 9.11.1, 9.12.0, 9.13.0 or 9.14.1? |
'this' is undefined at this point, so you will get errors like
Cannot read property 'requestAnimationFrame' of undefined
when assigning to variableraf
on the server.
global
is the analogouswindow
object on the server.