Skip to content

Commit e8e7ec6

Browse files
author
Andy Hanson
committed
Remember to check for existence of target.parent
1 parent efc7e9d commit e8e7ec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2810,7 +2810,7 @@ namespace ts {
28102810
function getAncestorCallLikeExpression(node: Node): CallLikeExpression | undefined {
28112811
const target = climbPastManyPropertyAccesses(node);
28122812
const callLike = target.parent;
2813-
return isCallLikeExpression(callLike) && getInvokedExpression(callLike) === target && callLike;
2813+
return callLike && isCallLikeExpression(callLike) && getInvokedExpression(callLike) === target && callLike;
28142814
}
28152815

28162816
function tryGetSignatureDeclaration(typeChecker: TypeChecker, node: Node): SignatureDeclaration | undefined {

0 commit comments

Comments
 (0)