Skip to content

Commit 9796557

Browse files
authored
Merge pull request microsoft#14373 from DLehenbauer/fixSpreadUsage
Fix TypeError when JSDoc.tags is undefined
2 parents c404666 + 2a38009 commit 9796557

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiler/utilities.ts

+4-1
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)