Skip to content

Commit 2a38009

Browse files
committed
Fix TypeError when JSDoc.tags is undefined (see microsoft#14362)
1 parent 4f1d7a5 commit 2a38009

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiler/utilities.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,10 @@ namespace ts {
15541554
}
15551555
}
15561556
else {
1557-
result.push(...filter((doc as JSDoc).tags, tag => tag.kind === kind));
1557+
const tags = (doc as JSDoc).tags;
1558+
if (tags) {
1559+
result.push(...filter(tags, tag => tag.kind === kind));
1560+
}
15581561
}
15591562
}
15601563
return result;

0 commit comments

Comments
 (0)