Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix crash on browsers that doesn't have asyncIterator

Abdullah Atta8d8acfb99dee
diff --git a/apps/web/src/common/sqlite/AccessHandlePoolVFS.js b/apps/web/src/common/sqlite/AccessHandlePoolVFS.js
index 650bc4bd1..792f20fd7 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]);
}