-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
My application allows users to create nodes, links them together, edit them, etc.
But when the text of a node is empty, then mermaid crashes. So to avoid that, I edited the buildNode(item)
method as such (see end of the method) :
buildNode(item) {
let edge = !item.edgeType
? this.edges.find(e => {
return e.type === "default";
})
: this.edges.find(e => {
return e.type === item.edgeType;
});
let text = item.text != '' ? item.text : ' - '
return `${item.id}${edge.open}${text}${edge.close}`;
},
Maybe it could be nice to add something like that in your library to prevent crashes ?
Metadata
Metadata
Assignees
Labels
No labels