mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
fix NaN error while adding subgraph
This commit is contained in:
@@ -265,8 +265,8 @@ const doRender = async (_elem, data4Layout, siteConfig, positions) => {
|
|||||||
await Promise.all(
|
await Promise.all(
|
||||||
data4Layout.nodes.map(async function (node) {
|
data4Layout.nodes.map(async function (node) {
|
||||||
let pos = positions.nodes[node.id];
|
let pos = positions.nodes[node.id];
|
||||||
node.height = pos?.height;
|
node.height = pos?.height || 0;
|
||||||
node.width = pos?.width;
|
node.width = pos?.width || 0;
|
||||||
|
|
||||||
if (node.isGroup) {
|
if (node.isGroup) {
|
||||||
node.x = 0;
|
node.x = 0;
|
||||||
|
Reference in New Issue
Block a user