Steps to reproduce:
1. Opening a cursor on an index (IDBIndex.prototype.openCursor())
2. req.onsuccess: call cursor.update() or store.put()
3. Next req.onsuccess indicates end of iteration (req.result is falsy)
3. Next req.onsuccess lands on the next object matched in the index.
Note: There seems not to be an issue for IDBObjectStore.prototype.openCursor(), it's just IDBIndex that fails.
The repro should show:
But with Safari 10 or 11, it shows
The reason the last digit is 1, is because a call to Dexie.Collection.modify() will stop after first match, as it calls cursor.update() on it.
Original issue: https://github.com/dfahlander/Dexie.js/issues/594