explicitly use the current location.href

This commit is contained in:
Kilian Valkhof committed 2024-12-04 12:00:23 +01:00
1 parent c85f82819e
commit e7a7156b9a
1 file changed
+1 -2
+1 -2
View File
@@ -54,7 +54,7 @@
const parseURL = url => {
try {
// use location.origin as the base to handle cases where the url is a relative path
const { pathname, search, hash } = new URL(url, href);
const { pathname, search, hash } = new URL(url, location.href);
url = pathname + search + hash;
} catch (e) {
/* empty */
@@ -79,7 +79,6 @@
if (!url) return;
currentRef = currentUrl;
currentUrl = parseURL(url.toString());
if (currentUrl !== currentRef) {