feat: Add support for hash-based routing tracking
This commit is contained in:
1 parent
e881735a23
commit
3fb68e1684
1 file changed
+3
-2
@@ -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 */
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user