Compare commits

..

6 Commits

Author SHA1 Message Date
4a57f7070a 3.0.27 2023-07-09 17:20:12 +02:00
f36bdcb181 fix(core): update 2023-07-09 17:20:12 +02:00
d3c90b0e7e 3.0.26 2023-07-03 10:08:45 +02:00
2397e69572 fix(core): update 2023-07-03 10:08:44 +02:00
7f7738d69f 3.0.25 2023-07-03 10:08:16 +02:00
f375e36a99 fix(core): update 2023-07-03 10:08:16 +02:00
3 changed files with 2 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@pushrocks/webrequest", "name": "@pushrocks/webrequest",
"version": "3.0.24", "version": "3.0.27",
"private": false, "private": false,
"description": "securely request from browsers", "description": "securely request from browsers",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/webrequest', name: '@pushrocks/webrequest',
version: '3.0.24', version: '3.0.27',
description: 'securely request from browsers' description: 'securely request from browsers'
} }

View File

@ -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);