fix(core): update
This commit is contained in:
parent
d3c90b0e7e
commit
f36bdcb181
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@pushrocks/webrequest',
|
name: '@pushrocks/webrequest',
|
||||||
version: '3.0.26',
|
version: '3.0.27',
|
||||||
description: 'securely request from browsers'
|
description: 'securely request from browsers'
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ export class WebRequest {
|
|||||||
this.polyfillStatusEvaluated = true;
|
this.polyfillStatusEvaluated = true;
|
||||||
const smartenv = new plugins.smartenv.Smartenv();
|
const smartenv = new plugins.smartenv.Smartenv();
|
||||||
if (!smartenv.isBrowser) {
|
if (!smartenv.isBrowser) {
|
||||||
console.log('webrequest using node context.');
|
|
||||||
this.polyfillStatusEvaluated = true;
|
this.polyfillStatusEvaluated = true;
|
||||||
const fetchMod = await smartenv.getSafeNodeModule('@adobe/fetch');
|
const fetchMod = await smartenv.getSafeNodeModule('@adobe/fetch');
|
||||||
this.neededPolyfillsLoadedDeferred.resolve({
|
this.neededPolyfillsLoadedDeferred.resolve({
|
||||||
@ -36,7 +35,6 @@ export class WebRequest {
|
|||||||
helixTimeout: fetchMod.timeoutSignal,
|
helixTimeout: fetchMod.timeoutSignal,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('webrequest using browser context.');
|
|
||||||
this.neededPolyfillsLoadedDeferred.resolve({
|
this.neededPolyfillsLoadedDeferred.resolve({
|
||||||
fetch: (...args) => {
|
fetch: (...args) => {
|
||||||
return fetch(...args);
|
return fetch(...args);
|
||||||
|
Loading…
Reference in New Issue
Block a user