mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-19 07:19:41 +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
|
parser.yy = classDb
|
||||||
|
|
||||||
const idCache = {}
|
let idCache = {}
|
||||||
|
|
||||||
let classCnt = 0
|
let classCnt = 0
|
||||||
const conf = {
|
const conf = {
|
||||||
@@ -301,6 +301,7 @@ export const setConf = function (cnf) {
|
|||||||
* @param id
|
* @param id
|
||||||
*/
|
*/
|
||||||
export const draw = function (text, id) {
|
export const draw = function (text, id) {
|
||||||
|
idCache = {}
|
||||||
parser.yy.clear()
|
parser.yy.clear()
|
||||||
parser.parse(text)
|
parser.parse(text)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user