taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit e40233c0378150094e025125960510c24b5bcdef
parent 68ab975d0acb3adcd348d5dafb967686c9e7bf15
Author: Florian Dold <dold@taler.net>
Date:   Sun, 19 Jul 2026 22:39:57 +0200

idb-bridge: fix IDBIndex.count() returning 1 for any non-empty match

count() passed limit: 1 to the backend, truncating before counting.

Diffstat:
Mpackages/idb-bridge/src/bridge-idb.ts | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/packages/idb-bridge/src/bridge-idb.ts b/packages/idb-bridge/src/bridge-idb.ts @@ -1474,7 +1474,9 @@ export class BridgeIDBIndex implements IDBIndex { const getReq: IndexGetQuery = { direction: "next", indexName: this._name, - limit: 1, + // 0 means unlimited. A limit of 1 truncated the result set before it + // was counted, so count() reported 1 for any non-empty match. + limit: 0, range: key, objectStoreName: this._objectStore._name, resultLevel: ResultLevel.OnlyCount,