mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Fix tracker for IE 11.
This commit is contained in:
parent
b176cc52e9
commit
598a95af94
1 changed files with 2 additions and 3 deletions
|
|
@ -35,7 +35,7 @@ import { removeTrailingSlash } from '../lib/url';
|
||||||
|
|
||||||
const root = hostUrl
|
const root = hostUrl
|
||||||
? removeTrailingSlash(hostUrl)
|
? removeTrailingSlash(hostUrl)
|
||||||
: new URL(script.src).href.split('/').slice(0, -1).join('/');
|
: script.src.split('/').slice(0, -1).join('/');
|
||||||
const screen = `${width}x${height}`;
|
const screen = `${width}x${height}`;
|
||||||
const listeners = [];
|
const listeners = [];
|
||||||
let currentUrl = `${pathname}${search}`;
|
let currentUrl = `${pathname}${search}`;
|
||||||
|
|
@ -139,8 +139,7 @@ import { removeTrailingSlash } from '../lib/url';
|
||||||
const newUrl = url.toString();
|
const newUrl = url.toString();
|
||||||
|
|
||||||
if (newUrl.substring(0, 4) === 'http') {
|
if (newUrl.substring(0, 4) === 'http') {
|
||||||
const { pathname, search } = new URL(newUrl);
|
currentUrl = '/' + newUrl.split('/').splice(3).join('/');
|
||||||
currentUrl = `${pathname}${search}`;
|
|
||||||
} else {
|
} else {
|
||||||
currentUrl = newUrl;
|
currentUrl = newUrl;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue