fix: fix draw function can only call once

This commit is contained in:
Vaniship 2019-05-07 15:06:58 +08:00 committed by GitHub
parent 7d3578b31a
commit c3f03e4497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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)