mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-05 07:09:40 +02:00
ensure maxLabelWidth is a number
Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
This commit is contained in:
@@ -22,6 +22,10 @@ function drawActorLegend(diagram) {
|
||||
maxWidth = 0;
|
||||
let yPos = 60;
|
||||
|
||||
if (isNaN(maxLabelWidth)) {
|
||||
throw new Error('maxLabelWidth must be a number');
|
||||
}
|
||||
|
||||
Object.keys(actors).forEach((person) => {
|
||||
const colour = actors[person].color;
|
||||
const circleData = {
|
||||
|
Reference in New Issue
Block a user