Skip to content

Commit

Permalink
web: fix crash on browsers that doesn't have asyncIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jul 11, 2024
1 parent 3a5b577 commit 8d8acfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/common/sqlite/AccessHandlePoolVFS.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
}
Expand Down Expand Up @@ -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]);
}
Expand Down

0 comments on commit 8d8acfb

Please sign in to comment.