mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Merge pull request #3087 from Kilian/fix-pushstate
fix #3083 improve the parseURL function to handle page-relative URLs
This commit is contained in:
commit
6b1c183077
1 changed files with 1 additions and 1 deletions
|
|
@ -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, origin);
|
||||
const { pathname, search, hash } = new URL(url, location.href);
|
||||
url = pathname + search + hash;
|
||||
} catch (e) {
|
||||
/* empty */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue