mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 07:07:17 +01:00
fix(tracker): Correctly extract pathname
This commit is contained in:
parent
e8da04bebe
commit
aef4b23cce
1 changed files with 7 additions and 1 deletions
|
|
@ -42,7 +42,13 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
const getPath = url => new URL(url).pathname;
|
const getPath = url => {
|
||||||
|
try {
|
||||||
|
return new URL(url).pathname;
|
||||||
|
} catch (e) {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const getPayload = () => ({
|
const getPayload = () => ({
|
||||||
website,
|
website,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue