mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
feat: Add support for hash-based routing tracking
This commit is contained in:
parent
e881735a23
commit
3fb68e1684
@ -53,8 +53,9 @@
|
||||
|
||||
const parseURL = url => {
|
||||
try {
|
||||
const { pathname, search } = new URL(url);
|
||||
url = pathname + search;
|
||||
// use location.origin as the base to handle cases where the url is a relative path
|
||||
const { pathname, search, hash } = new URL(url, location.origin);
|
||||
url = pathname + search + hash;
|
||||
} catch (e) {
|
||||
/* empty */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user