From f1fa91a51cf69e3589c4619541dda8ccdf35f063 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 2 Sep 2022 00:46:02 +0530 Subject: [PATCH] fix flowchart jison --- package.json | 2 +- src/diagrams/flowchart/parser/flow.jison | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 95df116b9..e7ae33c60 100644 --- a/package.json +++ b/package.json @@ -27,9 +27,9 @@ "build:code": "node .esbuild/esbuild.cjs", "build:types": "tsc -p ./tsconfig.json --emitDeclarationOnly", "build:webpack": "webpack --mode production --progress --color", + "build:watch": "yarn build:code --watch", "build": "yarn clean; concurrently \"yarn build:code\" \"yarn build:types\"", "postbuild": "documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > docs/Setup.md", - "build:watch": "yarn build:code --watch", "release": "yarn build", "lint": "eslint --cache ./ --ext .js,.json,.html,.md", "lint:fix": "yarn lint --fix", diff --git a/src/diagrams/flowchart/parser/flow.jison b/src/diagrams/flowchart/parser/flow.jison index e459a23d0..fae7c6cf2 100644 --- a/src/diagrams/flowchart/parser/flow.jison +++ b/src/diagrams/flowchart/parser/flow.jison @@ -271,7 +271,7 @@ document { $$ = [];} | document line { - if(Array.isArray($2) && $2.length > 0){ + if(!Array.isArray($2) || $2.length > 0){ $1.push($2); } $$=$1;}