Skip to content

Commit

Permalink
fix(2d): fix Code size calculation (#1025)
Browse files Browse the repository at this point in the history
Closes: #1024
  • Loading branch information
aarthificial committed Apr 6, 2024
1 parent faa9508 commit 696fbad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/2d/src/lib/code/CodeMetrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function measureString(
let lastWidth = firstWidth;
let maxWidth = firstWidth;

for (let i = 1; i < lines.length - 1; i++) {
for (let i = 1; i < lines.length; i++) {
const line = lines[i];
const width = Math.round(context.measureText(line).width / monoWidth);
if (width > maxWidth) {
Expand Down

0 comments on commit 696fbad

Please sign in to comment.