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

window is not defined #50

Open
johann-taberlet opened this issue Feb 8, 2023 · 0 comments
Open

window is not defined #50

johann-taberlet opened this issue Feb 8, 2023 · 0 comments

Comments

@johann-taberlet
Copy link

Hey there,
first I would like to thank you for all your amazing plugins.

I'm fairly new with Grapes and I don't really understand what's happening with this plugin.
I'm in a next.js context and I initiate the editor inside a useEffect hook, so normally I am assured that the code is executed on the client side but even with this, when I use this plugin I'm facing a "window is not defined" error.
I double checked with a test typeof window !== "undefined" before the editor init but doesn't fixed anything.
If I remove the plugin from the editor, I have no more errors.
If I just use the hot reload when I add it, it works pretty well. But if I refresh the page or if I try to run a build it fails.

Does anyone have an idea of the issue here ?

SCR-20230208-p96

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

1 participant