fix: fix if statment logic checks if `parser` is not `undefined`

This commit is contained in:
Reda Al Sulais 2023-08-21 03:09:05 +03:00
parent 984a0e6d06
commit 205360c109
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ export class Diagram {
this.parser.parse = (text: string) =>
originalParse(cleanupComments(extractFrontMatter(text, this.db)));
if (this.parser.parser?.yy) {
if (this.parser.parser !== undefined) {
this.parser.parser.yy = this.db;
}
this.init = diagram.init;