Skip to content

Commit 9a0a321

Browse files
fix: fallback if origin is 'null' (#5512)
1 parent a9c92ff commit 9a0a321

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/router-core/src/router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ export class RouterCore<
969969

970970
this.origin = this.options.origin
971971
if (!this.origin) {
972-
if (!this.isServer) {
972+
if (!this.isServer && window?.origin && window.origin !== 'null') {
973973
this.origin = window.origin
974974
} else {
975975
// fallback for the server, can be overridden by calling router.update({origin}) on the server

0 commit comments

Comments
 (0)