From 8d8acfb99dee542aadfa8bf35e1098344c3f0710 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Thu, 11 Jul 2024 11:55:17 +0500 Subject: [PATCH] web: fix crash on browsers that doesn't have asyncIterator --- apps/web/src/common/sqlite/AccessHandlePoolVFS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/src/common/sqlite/AccessHandlePoolVFS.js b/apps/web/src/common/sqlite/AccessHandlePoolVFS.js index 650bc4bd15..792f20fd71 100644 --- a/apps/web/src/common/sqlite/AccessHandlePoolVFS.js +++ b/apps/web/src/common/sqlite/AccessHandlePoolVFS.js @@ -213,7 +213,7 @@ export class AccessHandlePoolVFS extends VFS.Base { } async delete() { - for await (const [name] of this.#directoryHandle) { + for await (const [name] of await this.#directoryHandle.entries()) { await this.#directoryHandle.removeEntry(name, { recursive: true }); } } @@ -300,7 +300,7 @@ export class AccessHandlePoolVFS extends VFS.Base { async #acquireAccessHandles() { // Enumerate all the files in the directory. const files = []; - for await (const [name, handle] of this.#directoryHandle) { + for await (const [name, handle] of await this.#directoryHandle.entries()) { if (handle.kind === "file") { files.push([name, handle]); }