fix NaN error while adding subgraph

This commit is contained in:
Feroz Mujawar
2024-10-22 19:42:27 +05:30
parent 44e7e68e0b
commit 0d1212e463

View File

@@ -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;