Fix crash when @augments tag has no type (#18739)

This commit is contained in:
Andy authored and GitHub committed 2017-09-25 09:58:46 -07:00
1 parent a4cf79baa5
commit 17f10c032e
5 files changed
+73 -1

No files matched your search

+1 -1
View File
@@ -4990,7 +4990,7 @@ namespace ts {
const valueDecl = type.symbol.valueDeclaration;
if (valueDecl && isInJavaScriptFile(valueDecl)) {
const augTag = getJSDocAugmentsTag(type.symbol.valueDeclaration);
if (augTag) {
if (augTag && augTag.typeExpression && augTag.typeExpression.type) {
baseType = getTypeFromTypeNode(augTag.typeExpression.type);
}
}