From a629f3975b6eb2817f71a5d95d195bd93303dc5d Mon Sep 17 00:00:00 2001 From: Enrico Santagati Date: Mon, 23 Mar 2026 20:17:19 -0400 Subject: [PATCH] fix: yield results from _enumerate when metaOnly is true In `_enumerate`, the `metaOnly` branch used `return` instead of `return yield*`, causing `enumerateAllNormalDocs({ metaOnly: true })` to silently produce zero results. The async generator returned the inner iterator as a value rather than delegating to it. --- src/API/DirectFileManipulatorV2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/API/DirectFileManipulatorV2.ts b/src/API/DirectFileManipulatorV2.ts index d4d6cde2..6f9513d6 100644 --- a/src/API/DirectFileManipulatorV2.ts +++ b/src/API/DirectFileManipulatorV2.ts @@ -400,7 +400,7 @@ export class DirectFileManipulator implements LiveSyncLocalDBEnv { // return; } async *_enumerate(startKey: string, endKey: string, opt: { metaOnly: boolean }) { - if (opt.metaOnly) return this.liveSyncLocalDB.findEntries(startKey, endKey, {}); + if (opt.metaOnly) return yield* this.liveSyncLocalDB.findEntries(startKey, endKey, {}); for await (const f of this.liveSyncLocalDB.findEntries(startKey, endKey, {})) { yield await this.getByMeta(f); }