From d7948a845dadd59e36622a0656b252a7fea02d3c Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Tue, 28 Nov 2023 00:12:22 +0530 Subject: [PATCH] fix: Flatten Nodelist --- packages/mermaid/src/diagrams/flowchart/flowDb.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mermaid/src/diagrams/flowchart/flowDb.ts b/packages/mermaid/src/diagrams/flowchart/flowDb.ts index ebef6d2407..41a367289e 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowDb.ts +++ b/packages/mermaid/src/diagrams/flowchart/flowDb.ts @@ -496,7 +496,7 @@ export const addSubGraph = function ( let nodeList: string[] = []; - const { nodeList: nl, dir } = uniq([...nodeList, ...list]); + const { nodeList: nl, dir } = uniq(list.flat()); nodeList = nl; if (version === 'gen-1') { for (let i = 0; i < nodeList.length; i++) {