-
Notifications
You must be signed in to change notification settings - Fork 1
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
Not working in SSR enviroments #52
Comments
@oskari |
I'm sorry, my initial description was written a bit too hastily. Null check isn't sufficient as the whole
I'd guess a better way around it would be
https://github.com/js-cookie/js-cookie/blob/a427812597527fd82f9747fe075c2f65b93c3112/src/api.mjs#L6 |
Thank you for the PR @oskari |
In cookie.js#L10 a document -object is accessed but this might not be available in while in SSR, should probably be a check for if the document -object exists.
Facing this issue in Gatsby but I presume platforms like nextjs suffer the same?
The text was updated successfully, but these errors were encountered: