mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-06 01:15:42 +01:00
fix: Compatible with browsers that do not support ES2019
This commit is contained in:
parent
b006747a45
commit
60d4d8db22
@ -44,7 +44,7 @@
|
|||||||
if (result !== str) {
|
if (result !== str) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (e) {
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@
|
|||||||
try {
|
try {
|
||||||
const { pathname, search } = new URL(url);
|
const { pathname, search } = new URL(url);
|
||||||
url = pathname + search;
|
url = pathname + search;
|
||||||
} catch {
|
} catch (e) {
|
||||||
/* empty */
|
/* empty */
|
||||||
}
|
}
|
||||||
return excludeSearch ? url.split('?')[0] : url;
|
return excludeSearch ? url.split('?')[0] : url;
|
||||||
@ -217,7 +217,7 @@
|
|||||||
const text = await res.text();
|
const text = await res.text();
|
||||||
|
|
||||||
return (cache = text);
|
return (cache = text);
|
||||||
} catch {
|
} catch (e) {
|
||||||
/* empty */
|
/* empty */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user