From 19c370311d286ef5761ebb7cae4a2c1f3fd56d9f Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Thu, 18 Jan 2024 17:51:08 +0900 Subject: [PATCH] fix --- packages/frontend/src/nirax.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);