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

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

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);
}
}