Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecao committed Oct 12, 2023
2 parents a15fb89 + eae470c commit 003dc69
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tracker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,11 @@
};

const getPath = url => {
if (url.substring(0, 4) === 'http') {
return '/' + url.split('/').splice(3).join('/');
try {
return new URL(url).pathname;
} catch (e) {
return url;
}
return url;
};

const getPayload = () => ({
Expand Down

0 comments on commit 003dc69

Please sign in to comment.