Skip to content

Commit

Permalink
fix: getters not working when return type is a promise of an array of…
Browse files Browse the repository at this point in the history
… objects
  • Loading branch information
hendrik-depauw-lemon committed Nov 4, 2024
1 parent 184c5c2 commit 52c353e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/framework-common-helpers/src/instances.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ async function processProperties(source: any, result: any, propertiesMap: any):
if (source[key] !== undefined) {
if (propertiesMap[key].__isArray) {
result[key] = []
for (const item of source[key]) {
const value = source[key]
const resolvedValue = isPromise(value) ? await value : value
for (const item of resolvedValue) {
const newItem: any = {}
await processProperties(item, newItem, propertiesMap[key].__children)
if (Object.keys(newItem).length > 0) {
Expand Down

0 comments on commit 52c353e

Please sign in to comment.