From 0980609cc92dc2666a4d64249a3bef1765c39710 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 19 Oct 2015 11:27:49 +0200 Subject: [PATCH] fixed bug in delete operations --- src/Databases/IndexedDB.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Databases/IndexedDB.js b/src/Databases/IndexedDB.js index 16823321..93b9584f 100644 --- a/src/Databases/IndexedDB.js +++ b/src/Databases/IndexedDB.js @@ -93,7 +93,10 @@ Y.IndexedDB = (function () { operationsToAdd = [] for (var i in add) { // don't call the localStorage event twice.. - var op = yield* this.getOperation(JSON.parse(add[i]).id) + var op = JSON.parse(add[i]) + if (op.struct !== 'Delete') { + op = yield* this.getOperation(op.id) + } yield* this.store.operationAdded(this, op, true) } })