aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-11-10 14:24:02 +0100
committerFlorian Dold <florian@dold.me>2022-11-10 14:24:02 +0100
commit42d3a2b1d73789d9a216ec61247f67c81283c3d1 (patch)
tree80ae1aebc39e3e8cc478203488a363c6250f4f6d
parentdec3a30352da00435923dbf96c8feb4df56df6c7 (diff)
-fix polyfill
-rw-r--r--packages/taler-util/src/url.ts12
-rw-r--r--packages/taler-wallet-embedded/src/wallet-qjs.ts3
2 files changed, 11 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;
diff --git a/packages/taler-wallet-embedded/src/wallet-qjs.ts b/packages/taler-wallet-embedded/src/wallet-qjs.ts
index 01882cc16..69cecb828 100644
--- a/packages/taler-wallet-embedded/src/wallet-qjs.ts
+++ b/packages/taler-wallet-embedded/src/wallet-qjs.ts
@@ -308,3 +308,6 @@ export function installNativeWalletListener(): void {
logger.info("native wallet listener installed");
}
+
+// @ts-ignore
+globalThis.installNativeWalletListener = installNativeWalletListener;