Update packages/mermaid/src/dagre-wrapper/nodes.js

Co-authored-by: Sidharth Vinod <sidharthv96@gmail.com>
This commit is contained in:
Ibrahim Wassouf 2023-07-13 15:57:28 -03:00 committed by GitHub
parent 12c657f514
commit aeba7a1d0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -918,8 +918,8 @@ const class_box = (parent, node) => {
')'
);
//get the height of the bounding box of each member if exists
const memberBBox = lbl ? lbl.getBBox() : null;
verticalPos += (memberBBox.height ?? 0) + rowPadding;
const memberBBox = lbl?.getBBox();
verticalPos += (memberBBox?.height ?? 0) + rowPadding;
});
verticalPos += lineHeight;