From 70912b07250e7c86ace4a0b0b16e90352df93ece Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 1 Sep 2019 01:05:38 +0200 Subject: fix error in index iteration --- src/query.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/query.ts') diff --git a/src/query.ts b/src/query.ts index 7308d9ede..766696874 100644 --- a/src/query.ts +++ b/src/query.ts @@ -21,6 +21,7 @@ */ import { openPromise } from "./promiseUtils"; +import { join } from "path"; /** * Result of an inner join. @@ -463,11 +464,14 @@ class QueryStreamIndexJoin extends QueryStreamBase> { f(true, undefined, tx); return; } + const joinKey = this.key(value); + console.log("***** JOINING ON", joinKey); const s = tx.objectStore(this.storeName).index(this.indexName); - const req = s.openCursor(IDBKeyRange.only(this.key(value))); + const req = s.openCursor(IDBKeyRange.only(joinKey)); req.onsuccess = () => { const cursor = req.result; if (cursor) { + console.log(`join result for ${joinKey}`, { left: value, right: cursor.value }); f(false, { left: value, right: cursor.value }, tx); cursor.continue(); } -- cgit v1.2.3