mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-22 09:57:00 +01:00
Merge pull request #2337 from aldo-roman/master
fix(tracker): Correctly extract pathname
This commit is contained in:
commit
eae470c374
@ -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 = () => ({
|
||||
|
Loading…
Reference in New Issue
Block a user