Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: getters not working when return type is a promise of an array of… #1557

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: getters not working when return type is a promise of an array of…
… objects
  • Loading branch information
hendrik-depauw-lemon committed Nov 4, 2024
commit 52c353e74429c95139841d1f8b6c3754d828c9c1
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
Loading