Skip to content

Commit 8fff7b6

Browse files
committed
Set default value for description properties.
1 parent 1723600 commit 8fff7b6

File tree

1 file changed

+3
-3
lines changed
  • packages/doxdox-parser-jsdoc/src

1 file changed

+3
-3
lines changed

packages/doxdox-parser-jsdoc/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ export default async (cwd: string, path: string): Promise<File> => {
3737
)
3838
.map((jsdoc: Jsdoc) => {
3939
const params = (jsdoc.params || []).map(
40-
({ name, description, type }) => ({
40+
({ name, description = '', type }) => ({
4141
name,
4242
description,
4343
types: type.names
4444
})
4545
);
4646

4747
const returns = (jsdoc.returns || []).map(
48-
({ name, description, type }) => ({
48+
({ name, description = '', type }) => ({
4949
name,
5050
description,
5151
types: type.names
@@ -59,7 +59,7 @@ export default async (cwd: string, path: string): Promise<File> => {
5959
.map(param => param.name)
6060
.filter(name => !name?.match(/\./))
6161
.join(', ')})`,
62-
description: jsdoc.description,
62+
description: jsdoc.description || '',
6363
params,
6464
returns,
6565
private: jsdoc.access === 'private'

0 commit comments

Comments
 (0)