diff --git a/src/ObjectStore.js b/src/ObjectStore.js index 5ad969f..85bff07 100644 --- a/src/ObjectStore.js +++ b/src/ObjectStore.js @@ -153,6 +153,13 @@ function destroyMutationStack(target) { function resolveMutation(target, payloadId, delta) { var stack = pendingMutations[target]; var i; + if (delta.map === "DESTROY") { + return { + id: target, + latest: null, + fields: [] + }; + } for (i = 0; i < stack.length; i++) { if (stack[i].payloadId === payloadId) { delete stack[i].mutation;