From d5a491a0649b303dc6cc5cf1a6f29b8bcbf4991d Mon Sep 17 00:00:00 2001 From: Wes Souza Date: Tue, 17 Dec 2024 12:25:14 -0500 Subject: [PATCH] Maybe it now works on Firefox ESR? --- src/Wes95/utils/url.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Wes95/utils/url.ts b/src/Wes95/utils/url.ts index 270f6ae..0e86ecc 100644 --- a/src/Wes95/utils/url.ts +++ b/src/Wes95/utils/url.ts @@ -31,11 +31,11 @@ export const createURL = (urlString: string): URLObject => { throw new Error('Unable to infer hostname and pathname from pathname'); } - return { - ...urlToObject(url), - hostname: matches.groups.hostname, - pathname: matches.groups.pathname, - }; + const urlObject = urlToObject(url); + urlObject.hostname = matches.groups.hostname; + urlObject.pathname = matches.groups.pathname; + + return urlObject; }; export function getRealPublicURL(path: string | undefined) {