Skip to content

Commit 33059bc

Browse files
authored
fixing (suggestion)
1 parent b0b3ee8 commit 33059bc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/type/textCore.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,9 +1906,7 @@ function textCore(p5, fn) {
19061906
// adjust the bounding boxes based on horiz. text alignment
19071907
if (lines.length > 1) {
19081908
// When width is not provided (e.g., fontBounds path), fall back to the widest line.
1909-
const maxWidth = boxes.length
1910-
? boxes.reduce((m, b) => Math.max(m, b.w || 0), 0)
1911-
: 0;
1909+
const maxWidth = boxes.reduce((m, b) => Math.max(m, b.w || 0), 0);
19121910

19131911
boxes.forEach((bb) => {
19141912
const w = (width ?? maxWidth);

0 commit comments

Comments
 (0)