jakearchibald / idb

IndexedDB, but with promises
https://www.npmjs.com/package/idb
ISC License
6.31k stars 356 forks source link

IDB cursor delete only deletes first record in ios safari #123

Closed aneer-anwar closed 4 years ago

aneer-anwar commented 5 years ago

idb cursor delete works as expected in every other device but fails in ios safari . safari deletes only first record.

let cursor :IDBPCursorWithValue= await this.getCursor(columnMatch); while (cursor) { cursor.delete(); cursor = await cursor.continue(); } return true;

cursor gets null value on the second iteration. Please have a look.

justjake commented 5 years ago

How is this.getCursor(columnMatch); implemented? The issue could be there.

jakearchibald commented 5 years ago

Could you create a reduced demo of the issue on glitch.com, jsbin.com, or similar? I think it might just be a Safari bug, but I'd like to double check.

jakearchibald commented 4 years ago

Closing due to no reduced demo.