mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 14:59:53 +02:00
Fix for node with wrong type
This commit is contained in:
@@ -19,11 +19,13 @@ export const labelHelper = (parent, node, _classes, isNode) => {
|
||||
// Create the label and insert it after the rect
|
||||
const label = shapeSvg.insert('g').attr('class', 'label').attr('style', node.labelStyle);
|
||||
|
||||
const labelText = typeof node.labelText === 'string' ? node.labelText:node.labelText[0];
|
||||
|
||||
const text = label
|
||||
.node()
|
||||
.appendChild(
|
||||
createLabel(
|
||||
sanitizeText(decodeEntities(node.labelText), getConfig()),
|
||||
sanitizeText(decodeEntities(labelText), getConfig()),
|
||||
node.labelStyle,
|
||||
false,
|
||||
isNode
|
||||
|
Reference in New Issue
Block a user