Merge pull request #6059 from mermaid-js/6058-task-id-as-a-number

fix:Kanban diagrams will not render when adding a number as ticket id or assigned for a task
This commit is contained in:
Ashish Jain 2024-11-14 16:32:32 +00:00 committed by GitHub
commit 8328f74751
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,5 @@
---
'mermaid': patch
---
fix: Kanban diagrams will not render when adding a number as ticket id or assigned for a task

View File

@ -138,13 +138,13 @@ const addNode = (level: number, id: string, descr: string, type: number, shapeDa
node.label = doc?.label; node.label = doc?.label;
} }
if (doc?.icon) { if (doc?.icon) {
node.icon = doc?.icon; node.icon = doc?.icon.toString();
} }
if (doc?.assigned) { if (doc?.assigned) {
node.assigned = doc?.assigned; node.assigned = doc?.assigned.toString();
} }
if (doc?.ticket) { if (doc?.ticket) {
node.ticket = doc?.ticket; node.ticket = doc?.ticket.toString();
} }
if (doc?.priority) { if (doc?.priority) {