Skip to content

Commit 44f2233

Browse files
committed
fix(live preview): promise.all missing in loop call
When the live preview is fetching the reference, it is getting the data using the loop, it returns the data and then performs the operations. Hence, we fixed the issue by introducing the promise.all to the loop.
1 parent 85e43ee commit 44f2233

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ export function sendRequest(queryObject, options) {
374374
options
375375
);
376376
} else {
377-
_data.entries.forEach(async (entry) => {
377+
await Promise.all(_data.entries.map(async (entry) => {
378378
await updateLivePreviewReferenceEntry(
379379
referencesToBeResolvedMap,
380380
entry,
@@ -383,7 +383,7 @@ export function sendRequest(queryObject, options) {
383383
options
384384

385385
);
386-
})
386+
}))
387387
}
388388

389389
}

0 commit comments

Comments
 (0)