-fix polyfill
This commit is contained in:
parent
dec3a30352
commit
42d3a2b1d7
@ -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;
|
||||
|
@ -308,3 +308,6 @@ export function installNativeWalletListener(): void {
|
||||
|
||||
logger.info("native wallet listener installed");
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
globalThis.installNativeWalletListener = installNativeWalletListener;
|
||||
|
Loading…
Reference in New Issue
Block a user