Skip to content

Commit

Permalink
Merge pull request #3087 from Kilian/fix-pushstate
Browse files Browse the repository at this point in the history
fix #3083 improve the parseURL function to handle page-relative URLs
  • Loading branch information
mikecao authored Dec 4, 2024
2 parents 26c4240 + e7a7156 commit 6b1c183
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tracker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
const parseURL = url => {
try {
// use location.origin as the base to handle cases where the url is a relative path
const { pathname, search, hash } = new URL(url, origin);
const { pathname, search, hash } = new URL(url, location.href);
url = pathname + search + hash;
} catch (e) {
/* empty */
Expand Down

0 comments on commit 6b1c183

Please sign in to comment.