ensure maxLabelWidth is a number

Co-authored-by: pranavm2109 <mishrap@dickinson.edu>
This commit is contained in:
Shahir Ahmed
2025-03-19 20:41:43 -04:00
parent 044a3d9686
commit ea39254556

View File

@@ -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 = {