count on the index if we're using one, don't always take the store

This commit is contained in:
Bruno Windels 2022-01-28 15:14:58 +01:00
parent bd2c70b923
commit eabd303c8e

View File

@ -120,7 +120,7 @@ export class QueryTargetWrapper<T> {
count(keyRange?: IDBKeyRange): IDBRequest<number> {
try {
return this._qtStore.count(keyRange);
return this._qt.count(keyRange);
} catch(err) {
throw new IDBRequestAttemptError("count", this._qt, err, [keyRange]);
}