diff --git a/src/core/data/CHANGELOG.md b/src/core/data/CHANGELOG.md index d6d8931bc..143a98f76 100644 --- a/src/core/data/CHANGELOG.md +++ b/src/core/data/CHANGELOG.md @@ -9,6 +9,10 @@ Changelog > - :house: [Internal] > - :nail_care: [Polish] +#### :bug: Bug Fix + +* Fixed unnecessary nesting when data is received from the cache + ## v3.83.0 (2022-04-05) #### :rocket: New Feature diff --git a/src/core/data/modules/base.ts b/src/core/data/modules/base.ts index 363ebcedc..6137d724a 100644 --- a/src/core/data/modules/base.ts +++ b/src/core/data/modules/base.ts @@ -362,9 +362,13 @@ export default abstract class Provider extends ParamsProvider implements IProvid const compositionRes = res.then( (res) => Promise.all(tasks).then(async () => { - const + let data = >(await res.data); + if (data && Object.hasOwnProperty(data, alias)) { + data = data[alias]; + } + Object.set(composition, alias, data); cloneTasks.push((composition) => Object.set(composition, alias, data?.valueOf()));