From 757bb118ce6459296bd326a6d2105ca9c492d9e9 Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Thu, 16 Apr 2015 02:31:07 +0200 Subject: [PATCH] Insert bug detected (because of references) --- lib/Operations/Basic.coffee | 4 +++- package.json | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Operations/Basic.coffee b/lib/Operations/Basic.coffee index 002053fd..c6ae74a4 100644 --- a/lib/Operations/Basic.coffee +++ b/lib/Operations/Basic.coffee @@ -508,13 +508,15 @@ module.exports = ()-> _encode: (json = {})-> json.prev = @prev_cl.getUid() json.next = @next_cl.getUid() - json.parent = @parent.getUid() if @origin.type is "Delimiter" json.origin = "Delimiter" else if @origin isnt @prev_cl json.origin = @origin.getUid() + # if not (json.prev? and json.next?) + json.parent = @parent.getUid() + if @content?.getUid? json['content'] = @content.getUid() else diff --git a/package.json b/package.json index 04f0433d..648d63c6 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ }, "homepage": "https://dadamonad.github.io/yjs/", "dependencies": { + "chai": "^2.2.0" }, "devDependencies": { "codo": "^2.0.9",