@fmfe/genesis-remote
Advanced tools
Comparing version 0.0.51 to 0.0.52-alpha.0
@@ -236,6 +236,11 @@ "use strict"; | ||
if (isPromise(res)) { | ||
return res.then(function (data) { | ||
return res | ||
.then(function (data) { | ||
if (typeof data !== 'object') | ||
return null; | ||
return data; | ||
}) | ||
.catch(function (e) { | ||
console.error('[remote-view] Error calling fetch', e); | ||
return null; | ||
}); | ||
@@ -301,3 +306,3 @@ } | ||
var _this = this; | ||
this._fetch().then(function (data) { | ||
return this._fetch().then(function (data) { | ||
if (data === null) | ||
@@ -304,0 +309,0 @@ return; |
{ | ||
"name": "@fmfe/genesis-remote", | ||
"version": "0.0.51", | ||
"version": "0.0.52-alpha.0", | ||
"description": "", | ||
@@ -12,7 +12,7 @@ "main": "dist/index.js", | ||
"license": "MIT", | ||
"gitHead": "05859ebe05d7eafd5ff6bf4b97b7e009e52c4762", | ||
"gitHead": "abaa9daf62290f462f41ea859d620bba278a5458", | ||
"sideEffects": false, | ||
"devDependencies": { | ||
"@fmfe/genesis-core": "^0.0.51" | ||
"@fmfe/genesis-core": "^0.0.52-alpha.0" | ||
} | ||
} |
@@ -245,6 +245,11 @@ /* eslint-disable @typescript-eslint/prefer-for-of */ | ||
if (isPromise(res)) { | ||
return res.then((data: RemoteViewData | null) => { | ||
if (typeof data !== 'object') return null; | ||
return data; | ||
}); | ||
return res | ||
.then((data: RemoteViewData | null) => { | ||
if (typeof data !== 'object') return null; | ||
return data; | ||
}) | ||
.catch((e: Error) => { | ||
console.error('[remote-view] Error calling fetch', e); | ||
return null; | ||
}); | ||
} | ||
@@ -314,3 +319,3 @@ return Promise.resolve(null); | ||
clientLoad() { | ||
this._fetch().then((data: RemoteViewData) => { | ||
return this._fetch().then((data: RemoteViewData) => { | ||
if (data === null) return; | ||
@@ -317,0 +322,0 @@ Promise.all([ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28871
856
2