mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-05 17:05:46 +01:00
explicitly use the current location.href
This commit is contained in:
parent
c85f82819e
commit
e7a7156b9a
@ -54,7 +54,7 @@
|
|||||||
const parseURL = url => {
|
const parseURL = url => {
|
||||||
try {
|
try {
|
||||||
// use location.origin as the base to handle cases where the url is a relative path
|
// 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;
|
url = pathname + search + hash;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/* empty */
|
/* empty */
|
||||||
@ -79,7 +79,6 @@
|
|||||||
if (!url) return;
|
if (!url) return;
|
||||||
|
|
||||||
currentRef = currentUrl;
|
currentRef = currentUrl;
|
||||||
|
|
||||||
currentUrl = parseURL(url.toString());
|
currentUrl = parseURL(url.toString());
|
||||||
|
|
||||||
if (currentUrl !== currentRef) {
|
if (currentUrl !== currentRef) {
|
||||||
|
Loading…
Reference in New Issue
Block a user