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",