From 68c21131d3b47979aa1a71057a80eababf3fa95e Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Mon, 15 Feb 2016 15:21:11 +0100 Subject: [PATCH] Remove that single \`for.. in\` loop that appearantly causes troubles for istvan (why am I fixing this again?) fixes #46 --- src/Database.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Database.js b/src/Database.js index 5ad9f4a8..4d249a91 100644 --- a/src/Database.js +++ b/src/Database.js @@ -214,8 +214,8 @@ module.exports = function (Y /* :any */) { * check if was deleted, apply a delete operation after op was applied */ apply (ops) { - for (var key in ops) { - var o = ops[key] + for (var i = 0; i < ops.length; i++) { + var o = ops[i] if (o.id == null || o.id[0] !== this.y.connector.userId) { var required = Y.Struct[o.struct].requiredOps(o) this.whenOperationsExist(required, o)