Skip to content

Commit

Permalink
fix bug it idb.iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Dec 6, 2022
1 parent 50d0147 commit 550eb78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions indexeddb.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ const iterateOnRequest = (request, f) => promise.create((resolve, reject) => {
*/
request.onsuccess = async event => {
const cursor = event.target.result
const res = await f(cursor)
if (cursor === null || res === false) {
if (cursor === null || (await f(cursor)) === false) {
return resolve()
}
cursor.continue()
Expand Down

0 comments on commit 550eb78

Please sign in to comment.