diff options
Diffstat (limited to 'packages/taler-util')
-rw-r--r-- | packages/taler-util/src/url.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/taler-util/src/url.ts b/packages/taler-util/src/url.ts index 245c4f8f7..eb7248b7b 100644 --- a/packages/taler-util/src/url.ts +++ b/packages/taler-util/src/url.ts @@ -83,20 +83,24 @@ export interface URLCtor { })(); // @ts-ignore -const _URL = globalThis.URL; +let _URL = globalThis.URL; if (!_URL) { // @ts-ignore - globalThis.URL = URLImpl; + globalThis.URL = _URL = URLImpl; + // @ts-ignore + _URL = URLImpl; } export const URL: URLCtor = _URL; // @ts-ignore -const _URLSearchParams = globalThis.URLSearchParams; +let _URLSearchParams = globalThis.URLSearchParams; if (!_URLSearchParams) { // @ts-ignore - globalThis.URL = URLSearchParamsImpl; + globalThis.URLSearchParams = URLSearchParamsImpl; + // @ts-ignore + _URLSearchParams = URLSearchParamsImpl; } export const URLSearchParams: URLSearchParamsCtor = _URLSearchParams; |