mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
Merge pull request #832 from vaniship/master
fix draw function can only call once
This commit is contained in:
commit
b951d506d9
@ -8,7 +8,7 @@ import { parser } from './parser/classDiagram'
|
||||
|
||||
parser.yy = classDb
|
||||
|
||||
const idCache = {}
|
||||
let idCache = {}
|
||||
|
||||
const conf = {
|
||||
dividerMargin: 10,
|
||||
@ -334,6 +334,7 @@ export const setConf = function (cnf) {
|
||||
* @param id
|
||||
*/
|
||||
export const draw = function (text, id) {
|
||||
idCache = {}
|
||||
parser.yy.clear()
|
||||
parser.parse(text)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user