Skip to content

Commit 65f09d6

Browse files
committed
Don't crash
1 parent 1f9153f commit 65f09d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,7 @@ namespace ts {
29612961
const getter = <AccessorDeclaration>getDeclarationOfKind(symbol, SyntaxKind.GetAccessor);
29622962
const setter = <AccessorDeclaration>getDeclarationOfKind(symbol, SyntaxKind.SetAccessor);
29632963

2964-
if (getter.flags & NodeFlags.JavaScriptFile) {
2964+
if (getter && getter.flags & NodeFlags.JavaScriptFile) {
29652965
const jsDocType = getTypeForVariableLikeDeclarationFromJSDocComment(getter);
29662966
if (jsDocType) {
29672967
return links.type = jsDocType;

0 commit comments

Comments
 (0)