From 368bf02bc22d0584f520fbc0fabf9f7aa5a09af9 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 18 Jan 2024 13:57:36 +0100 Subject: [PATCH] MOBILE-4304 h5p: Fix async delete --- src/core/features/h5p/classes/file-storage.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/features/h5p/classes/file-storage.ts b/src/core/features/h5p/classes/file-storage.ts index 7cccc2b0d..1be91e3c1 100644 --- a/src/core/features/h5p/classes/file-storage.ts +++ b/src/core/features/h5p/classes/file-storage.ts @@ -201,14 +201,14 @@ export class CoreH5PFileStorage { const result = await db.execute(query, queryArgs); - await Array.from(result.rows).map(async (entry: {foldername: string}) => { + await Promise.all(Array.from(result.rows).map(async (entry: {foldername: string}) => { try { // Delete the index.html. await this.deleteContentIndex(entry.foldername, site.getId()); } catch { // Ignore errors. } - }); + })); } /**