mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 03:20:27 +00:00
Merge pull request #102 from usefathom/revert-98-patch-5
Revert "link[href] is already an absolute URL", create <a> element for correct parsing.
This commit is contained in:
commit
98c5487a58
@ -73,7 +73,11 @@ function trackPageview() {
|
||||
// parse canonical, if page has one
|
||||
let canonical = document.querySelector('link[rel="canonical"][href]');
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user