mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 11:30:28 +00:00
default to empty path if parsing from <a> fails. #73
This commit is contained in:
parent
ad29167db1
commit
67308e3348
@ -79,6 +79,11 @@ function trackPageview() {
|
|||||||
path = a.pathname;
|
path = a.pathname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if parsing path failed, default to main page
|
||||||
|
if(!path) {
|
||||||
|
path = '/';
|
||||||
|
}
|
||||||
|
|
||||||
// only set referrer if not internal
|
// only set referrer if not internal
|
||||||
let referrer = '';
|
let referrer = '';
|
||||||
if(document.referrer.indexOf(location.hostname) < 0) {
|
if(document.referrer.indexOf(location.hostname) < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user