You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the bug
In Nuxt3 the useClickAway composable throws an error within an SSR context: window is not defined.
The error occurs here:
if (!window) {
return;
}
however I have no idea why Nuxt complains here since the expression !window should just evaluate to a thruthy value and therefore just process the if-statement.
The following will fix the issue:
if (typeof window !== 'undefined' || !window) {
return;
}
I will submit a PR
The text was updated successfully, but these errors were encountered:
Description of the bug
In Nuxt3 the
useClickAway
composable throws an error within an SSR context:window is not defined
.The error occurs here:
however I have no idea why Nuxt complains here since the expression
!window
should just evaluate to a thruthy value and therefore just process the if-statement.The following will fix the issue:
I will submit a PR
The text was updated successfully, but these errors were encountered: