diff --git a/src/mermaidAPI.js b/src/mermaidAPI.js index 2e9ec5f15..a7b9adfc7 100644 --- a/src/mermaidAPI.js +++ b/src/mermaidAPI.js @@ -80,9 +80,9 @@ function parse(text) { log.debug('Type ' + graphType); switch (graphType) { case 'gitGraph': + gitGraphAst.clear(); parser = gitGraphParser; parser.parser.yy = gitGraphAst; - parser.parser.yy.clear(); break; case 'flowchart': flowDb.clear();