fix(core): update

This commit is contained in:
2022-03-25 00:04:24 +01:00
parent e9e974e696
commit ce9d02562f
3 changed files with 386 additions and 80 deletions

View File

@ -14,7 +14,8 @@ export class WebRequest {
const smartenv = new plugins.smartenv.Smartenv();
if (!smartenv.isBrowser) {
this.polyfillStatusEvaluated = true;
await smartenv.getSafeNodeModule('node-fetch');
const fetch = await smartenv.getSafeNodeModule('node-fetch');
globalThis.fetch = fetch.default;
}
this.neededPolyfillsLoadedDeferred.resolve();
}