From e81f3b9868d4a8cee46509c135eb73df81f2422a Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Thu, 11 Jul 2019 16:12:02 +0000 Subject: [PATCH] Save and restore IDs to prevent dupes --- Architype.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Architype.js b/Architype.js index 5c3d60e..afbe2a3 100644 --- a/Architype.js +++ b/Architype.js @@ -52,6 +52,7 @@ class Architype { return { version: 1, generation: ++this.generation_, + nextId: idSource.getId(), editor: this.editor_.serialize(), }; } @@ -64,6 +65,7 @@ class Architype { switch (ser.version) { case 1: this.generation_ = ser.generation; + idSource.setId(ser.nextId); this.editor_.unserialize(ser.editor); break;