feat: Add support for hash-based routing tracking
This commit is contained in:
@@ -53,8 +53,9 @@
|
|||||||
|
|
||||||
const parseURL = url => {
|
const parseURL = url => {
|
||||||
try {
|
try {
|
||||||
const { pathname, search } = new URL(url);
|
// use location.origin as the base to handle cases where the url is a relative path
|
||||||
url = pathname + search;
|
const { pathname, search, hash } = new URL(url, location.origin);
|
||||||
|
url = pathname + search + hash;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/* empty */
|
/* empty */
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user