The delete function does not check if a keypath is specified, therefore tries to remove the entry using the id attribute making the state incoherent: the object is correctly removed from the backbone collection but not from indexeddb
changing
var deleteRequest = store.delete(json.id);
to
var deleteRequest;
if (!store.keyPath)
deleteRequest = store.delete(json.id);
else
deleteRequest = store.delete(object.get(store.keyPath));
The delete function does not check if a keypath is specified, therefore tries to remove the entry using the id attribute making the state incoherent: the object is correctly removed from the backbone collection but not from indexeddb
changing
to
fix this issue