fix(Diagram): fix persisted data due to db not being cleared before parsing

This commit is contained in:
Harman Goei
2022-08-09 21:20:38 -07:00
parent 48fe013c83
commit a5aef9e330
2 changed files with 77 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ class Diagram {
// console.log('this.type', this.type, diagrams[this.type]);
// Setup diagram
this.db = diagrams[this.type].db;
this.db.clear();
this.renderer = diagrams[this.type].renderer;
this.parser = diagrams[this.type].parser;
this.parser.parser.yy = this.db;