Skip to content

Commit

Permalink
Correct typeof comparison to fix #1775 (#1914)
Browse files Browse the repository at this point in the history
Current comparision is against an object and from documentation the typeof returns a string so comparision should be string based.
  • Loading branch information
sytone authored Apr 29, 2024
1 parent 9da23bf commit 6ecba2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/91indexeddb.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ IDB.fromTable = function (databaseid, tableid, cb, idx, query) {
const cursor = cur.result;
if (cursor) {
// if keyPath(columns) is not present then we take the key and value as object.
const cursorValue = typeof cursor === Object ? cursor.value : {[cursor.key]: cursor.value};
const cursorValue = typeof cursor === "object" ? cursor.value : {[cursor.key]: cursor.value};
res.push(cursorValue);
cursor.continue();
} else {
Expand Down

0 comments on commit 6ecba2e

Please sign in to comment.