diff --git a/packages/frontend/src/nirax.ts b/packages/frontend/src/nirax.ts index a510d37167..afb5543021 100644 --- a/packages/frontend/src/nirax.ts +++ b/packages/frontend/src/nirax.ts @@ -355,7 +355,7 @@ export class Router extends EventEmitter implements IRouter { redirectPath = res.route.redirect + (res._parsedRoute.queryString ? '?' + res._parsedRoute.queryString : '') + (res._parsedRoute.hash ? '#' + res._parsedRoute.hash : ''); } if (_DEV_) console.log('Redirecting to: ', redirectPath); - if (_redirected || this.redirectCount++ > 10) { + if (_redirected && this.redirectCount++ > 10) { throw new Error('redirect loop detected'); } return this.navigate(redirectPath, null, emitChange, true);