Skip to content

Commit

Permalink
fix: handle case where stdout.columns can be undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 21, 2024
1 parent b56c538 commit 437cb2d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/dumper/dumper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ export class Dumper {
* Whitespace between the title and the link to align them
* on each side of x axis
*/
console.log({ columns })
const whiteSpaceLength = Number.isNaN(columns) ? 1 : columns - link.length - title.length - 4
const whiteSpaceLength = columns ? columns - link.length - title.length - 4 : 1
const whiteSpace = new Array(whiteSpaceLength <= 0 ? 1 : whiteSpaceLength).join(' ')

/**
Expand Down

0 comments on commit 437cb2d

Please sign in to comment.