MOBILE-4470 workshop: Fix sync submission finishing without waiting

main
Dani Palou 2024-06-07 15:43:05 +02:00
parent 4dd7b45678
commit 7cb9f1351c
1 changed files with 2 additions and 2 deletions

View File

@ -311,7 +311,7 @@ export class AddonModWorkshopSyncProvider extends CoreSyncBaseProvider<AddonModW
return; return;
} }
submissionActions.forEach(async (action) => { await Promise.all(submissionActions.map(async (action) => {
submissionId = action.submissionid > 0 ? action.submissionid : submissionId; submissionId = action.submissionid > 0 ? action.submissionid : submissionId;
try { try {
@ -397,7 +397,7 @@ export class AddonModWorkshopSyncProvider extends CoreSyncBaseProvider<AddonModW
siteId, siteId,
); );
} }
}); }));
if (discardError) { if (discardError) {
// Submission was discarded, add a warning. // Submission was discarded, add a warning.