Skip to content

Commit

Permalink
fix: handle NaN value case
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Sep 21, 2024
1 parent b3d1ddf commit 619a3a8
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
*/
const whiteSpaceLength = columns - link.length - title.length - 4
console.log({ whiteSpaceLength, new: whiteSpaceLength <= 0 ? 1 : whiteSpaceLength })
const whiteSpaceLength = Number.isNaN(columns) ? 1 : columns - link.length - title.length - 4
const whiteSpace = new Array(whiteSpaceLength <= 0 ? 1 : whiteSpaceLength).join(' ')

/**
Expand Down

0 comments on commit 619a3a8

Please sign in to comment.