Closed johnnyeric closed 5 years ago
Hello @johnnyeric, glad you liked CodeFlask!
Care to elaborate a little more about the issue with Next.js?
Shouldn't CSS
be undefined
both in client and SSR if it doesn't exists? In this case, the if(CSS)
should handle both cases, why isn't it the case for Next.js?
Sure, the problem is that when rendering on the server it seems the variable is not even declared so it throws when trying to access it in the if(CSS)
.
Then the typeof handles both cases, when it is not declared and when it is declared but is undefined.
The error message I get is CSS is not defined
.
Now it makes sense, merging it.
Thanks for the PR!
Hi @kazzkiq. Thanks for this project, it's great!
I've been experimenting the editor with Next.js and found an issue when using SSR on the
CSS
check.It's a very simple fix but I took the liberty of creating this pull request.
Thank you