Skip to content

Commit

Permalink
fix(docs): add default empty string to description
Browse files Browse the repository at this point in the history
  • Loading branch information
anymaniax committed Oct 8, 2021
1 parent eb6cbd3 commit 12462e3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ export function jsDoc(
tryOneLine = false,
): string {
// Ensure there aren't any comment terminations in doc
const lines = (Array.isArray(description) ? description : [description])
.map(line => line.replace('*/', '*\\/'));
const lines = (
Array.isArray(description) ? description : [description || '']
).map((line) => line.replace('*/', '*\\/'));

const count = [description, deprecated, summary].reduce(
(acc, it) => (it ? acc + 1 : acc),
Expand Down

0 comments on commit 12462e3

Please sign in to comment.