From 7be262e9f3a88afcee5358ab1312214698bbf4dd Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 4 Feb 2016 15:26:09 +0100 Subject: [PATCH] fixing @Joeao bug --- src/Transaction.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Transaction.js b/src/Transaction.js index 310e804a..26e42677 100644 --- a/src/Transaction.js +++ b/src/Transaction.js @@ -601,12 +601,11 @@ module.exports = function (Y/* :any */) { yield* this.setState(state) } } - } - if (this.store.forwardAppliedOperations) { - for (let c = del[1]; c < del[1] + del[2]; c++) { - var ops = deletions.map(function (d) { - return {struct: 'Delete', target: [d[0], c]} // TODO: implement Delete with deletion length! - }) + if (this.store.forwardAppliedOperations) { + var ops = [] + for (let c = del[1]; c < del[1] + del[2]; c++) { + ops.push({struct: 'Delete', target: [d[0], c]}) // TODO: implement Delete with deletion length! + } this.store.y.connector.broadcastOps(ops) } }