Fix the crash found while compiling src/compiler

This commit is contained in:
Sheetal Nandi
2019-02-22 10:53:31 -08:00
parent 494bd92f1b
commit 4dc8ac7500
+1 -1
View File
@@ -6780,7 +6780,7 @@ namespace ts {
/* @internal */
export function isDeclaration(node: Node): node is NamedDeclaration {
if (node.kind === SyntaxKind.TypeParameter) {
return node.parent.kind !== SyntaxKind.JSDocTemplateTag || isInJSFile(node);
return (node.parent && node.parent.kind !== SyntaxKind.JSDocTemplateTag) || isInJSFile(node);
}
return isDeclarationKind(node.kind);