diff --git a/packages/mermaid/src/Diagram.ts b/packages/mermaid/src/Diagram.ts index 88bd05150..5e88be558 100644 --- a/packages/mermaid/src/Diagram.ts +++ b/packages/mermaid/src/Diagram.ts @@ -51,6 +51,7 @@ export class Diagram { originalParse(cleanupComments(extractFrontMatter(text, this.db, configApi.addDirective))); if (this.parser.parser !== undefined) { + // The parser.parser.yy is only present in JISON parsers. So, we'll only set if required. this.parser.parser.yy = this.db; } this.init = diagram.init;