diff --git a/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js b/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js index 52f8e921c..aa668d834 100644 --- a/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js +++ b/packages/mermaid/src/rendering-util/layout-algorithms/fixed/index.js @@ -265,8 +265,8 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => { await Promise.all( data4Layout.nodes.map(async function (node) { let pos = positions.nodes[node.id]; - node.height = pos?.height; - node.width = pos?.width; + node.height = pos?.height || 0; + node.width = pos?.width || 0; if (node.isGroup) { node.x = 0;