mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
fix: fix draw function can only call once
This commit is contained in:
@@ -8,7 +8,7 @@ import { parser } from './parser/classDiagram'
|
||||
|
||||
parser.yy = classDb
|
||||
|
||||
const idCache = {}
|
||||
let idCache = {}
|
||||
|
||||
let classCnt = 0
|
||||
const conf = {
|
||||
@@ -301,6 +301,7 @@ export const setConf = function (cnf) {
|
||||
* @param id
|
||||
*/
|
||||
export const draw = function (text, id) {
|
||||
idCache = {}
|
||||
parser.yy.clear()
|
||||
parser.parse(text)
|
||||
|
||||
|
Reference in New Issue
Block a user