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