mirror of https://github.com/status-im/fathom.git
Merge pull request #98 from da2x/patch-5
link[href] is already an absolute URL
This commit is contained in:
commit
c8eef57e2a
|
@ -73,11 +73,7 @@ function trackPageview() {
|
|||
// parse canonical, if page has one
|
||||
let canonical = document.querySelector('link[rel="canonical"][href]');
|
||||
if(canonical) {
|
||||
let a = document.createElement('a');
|
||||
a.href = canonical.href;
|
||||
|
||||
// use parsed canonical as location object
|
||||
req = a;
|
||||
req = canonical.href;
|
||||
}
|
||||
|
||||
// get path and pathname from location or canonical
|
||||
|
|
Loading…
Reference in New Issue