Why is this change causing SyntaxError? #15762
Unanswered
PabloDinella
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I was suffering from an infinite loop when running the firebase authentication example, which I was able to fix with an early return if the app is already on the route, but for some crazy reason, if I change the following line I get SyntaxError:
If I change
if (!cookie) {
toif (!cookie && router.route !== '/') {
, or evenif (false) {
, I get:It only works if I create a completely new if block:
I've tested creating a new app from scratch with
yarn create next-app --example with-firebase-authentication test
and changing the line, same error.What is happening? Do you guys get this error?
Beta Was this translation helpful? Give feedback.
All reactions