Open lc-thomas opened 3 years ago
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)
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 ?
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) :Maybe it could be nice to add something like that in your library to prevent crashes ?