diff --git a/Architype.js b/Architype.js index 4ca3e52..9fd49cf 100644 --- a/Architype.js +++ b/Architype.js @@ -110,6 +110,7 @@ class Architype { switch (ser.version) { case 1: + this.backwardCompat1(ser); this.generation_ = ser.generation; idSource.setId(ser.nextId); this.editor_.unserialize(ser.editor); @@ -129,6 +130,20 @@ class Architype { } } + backwardCompat1(ser) { + for (let item of ser.editor) { + // 3bdb240 + if ((item.type == 'link' || item.type == 'group') && + item.label != null && + item.labelObj == undefined) { + console.log('backwards compat 3bdb240', item); + item.labelObj = { + highlight: false, + }; + } + } + } + overwrite(ser) { this.unobserve(); this.editor_.clear(); diff --git a/EditorGroup.js b/EditorGroup.js index 682f90c..fb77061 100644 --- a/EditorGroup.js +++ b/EditorGroup.js @@ -26,10 +26,6 @@ class EditorGroup extends EditorSublistBase { } static unserialize(ser) { - //// Backwards compat - // 3bdb240 - ser.labelObj = ser.labelObj || {}; - let group = new EditorGroup(ser.id); group.nodes_.clear(); if (ser.label != null) {