From 622d7045bdfc3f884fd58f0e1ab85fb359158a57 Mon Sep 17 00:00:00 2001 From: Manuel Schiller Date: Fri, 17 Oct 2025 19:27:44 +0200 Subject: [PATCH] fix: fallback if origin is 'null' fixes #5509 --- packages/router-core/src/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router-core/src/router.ts b/packages/router-core/src/router.ts index 78b5e11608b..01bc02a7473 100644 --- a/packages/router-core/src/router.ts +++ b/packages/router-core/src/router.ts @@ -969,7 +969,7 @@ export class RouterCore< this.origin = this.options.origin if (!this.origin) { - if (!this.isServer) { + if (!this.isServer && window?.origin && window.origin !== 'null') { this.origin = window.origin } else { // fallback for the server, can be overridden by calling router.update({origin}) on the server