diff --git a/src/containers/LiveEditor/CustomNode.tsx b/src/containers/LiveEditor/CustomNode.tsx index eb15c5f..c65f7d0 100644 --- a/src/containers/LiveEditor/CustomNode.tsx +++ b/src/containers/LiveEditor/CustomNode.tsx @@ -90,22 +90,25 @@ const CustomNode = ({ nodeProps }) => { - {entries.map((val) => ( -
- {val[0]}: - {val[1]} -
- ))} + {entries.map( + (val) => + val[1] !== null && ( +
+ {val[0]}: + {val[1]} +
+ ) + )}
diff --git a/src/containers/LiveEditor/helpers.ts b/src/containers/LiveEditor/helpers.ts index 4f09fcd..ea13c6e 100644 --- a/src/containers/LiveEditor/helpers.ts +++ b/src/containers/LiveEditor/helpers.ts @@ -22,8 +22,8 @@ export function getEdgeNodes(graph: any, isExpanded: boolean = true): any { nodes.push({ id: el.id, text: el.text, - width: isExpanded ? (35 + longestLine * 8) : 180, - height: isExpanded ? (30 + lines.length * 10) : 50, + width: isExpanded ? 35 + longestLine * 8 : 180, + height: isExpanded ? 30 + lines.length * 10 : 50, data: { type: "special" }, }); } else {