diff --git a/test/indexeddb_mock.js b/test/indexeddb_mock.js
index <HASH>..<HASH> 100644
--- a/test/indexeddb_mock.js
+++ b/test/indexeddb_mock.js
@@ -148,7 +148,11 @@ export class IDBObjectStore {
       data,
       request
     };
-    request.result = new IDBCursorWithValue(this, cursorInternal);
+    if (keys.length === 0) {
+      request.result = null;
+    } else {
+      request.result = new IDBCursorWithValue(this, cursorInternal);
+    }
     return request;
   }
 }
@@ -216,6 +220,7 @@ export class IDBTransaction {
   abort() {
 
   }
+
   objectStore(name) {
     if (!this._flags.active) {
       throw new DOMException('InvalidStateError');
Return null for the cursor if we have no data