Skip to content

Commit

Permalink
Fix ElmTransformer.formatElmError with wrong repeat str length (#8882)
Browse files Browse the repository at this point in the history
  • Loading branch information
fireairforce committed Mar 24, 2023
1 parent b2331a1 commit 9e6d008
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/transformers/elm/src/ElmTransformer.js
Expand Up @@ -167,7 +167,10 @@ function elmCompileErrorToParcelDiagnostics(error) {
}

function formatElmError(problem, relativePath) {
const padLength = 80 - 5 - problem.title.length - relativePath.length;
const padLength = Math.max(
80 - 5 - problem.title.length - relativePath.length,
1,
);
const dashes = '-'.repeat(padLength);
const message = [
'',
Expand Down

0 comments on commit 9e6d008

Please sign in to comment.