Fixed an incorrect reference to an outer variable (actor) when processing actor widths

This commit is contained in:
Chris Moran 2020-06-18 08:51:16 -04:00
parent e64a65c41e
commit 24ed979faf
No known key found for this signature in database
GPG Key ID: FBD13F2A0E1B9152
1 changed files with 1 additions and 1 deletions

View File

@ -991,7 +991,7 @@ const calculateActorMargins = function(actors, actorToMessageWidth) {
[actor, nextActor].forEach(function(act) {
if (act.wrap) {
actor.description = utils.wrapLabel(actor.description, conf.width, textConf);
act.description = utils.wrapLabel(act.description, conf.width, textConf);
}
const actDims = utils.calculateTextDimensions(act.description, textConf);
act.width = act.wrap ? conf.width : Math.max(conf.width, actDims.width);