From 98f4e0c6a64bdcb81ea5e6e33eb022c4e9e9750b Mon Sep 17 00:00:00 2001 From: Thomas Weeber Date: Fri, 14 Oct 2022 15:52:23 +0200 Subject: [PATCH 1/2] fixed createURL() for Firefox --- packages/router/router.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/router/router.ts b/packages/router/router.ts index 2e7e495c38..e12e5ae198 100644 --- a/packages/router/router.ts +++ b/packages/router/router.ts @@ -2844,8 +2844,13 @@ function getTargetMatch( } function createURL(location: Location | string): URL { + // window.location.origin is "null" (the literal string value) in Firefox under certain conditions + // https://bugzilla.mozilla.org/show_bug.cgi?id=878297 + // this breaks the app when a production build is served from the local file system let base = - typeof window !== "undefined" && typeof window.location !== "undefined" + typeof window !== "undefined" && + typeof window.location !== "undefined" && + window.location.origin !== "null" ? window.location.origin : "unknown://unknown"; let href = typeof location === "string" ? location : createHref(location); From ce4ef8bf3d7e131fbc07445906f8a2ab4a372989 Mon Sep 17 00:00:00 2001 From: AchThomas <6598917+AchThomas@users.noreply.github.com> Date: Fri, 14 Oct 2022 15:58:44 +0200 Subject: [PATCH 2/2] Update contributors.yml --- contributors.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/contributors.yml b/contributors.yml index 82ff65bb5b..bbb89efb89 100644 --- a/contributors.yml +++ b/contributors.yml @@ -1,5 +1,6 @@ - abdallah-nour - abhi-kr-2100 +- AchThomas - Ajayff4 - alany411 - alexlbr