mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
Fix truthiness call check for this-property access (#38163)
This commit is contained in:
@@ -31909,7 +31909,9 @@ namespace ts {
|
||||
let childExpression = childNode.parent;
|
||||
while (testedExpression && childExpression) {
|
||||
|
||||
if (isIdentifier(testedExpression) && isIdentifier(childExpression)) {
|
||||
if (isIdentifier(testedExpression) && isIdentifier(childExpression) ||
|
||||
testedExpression.kind === SyntaxKind.ThisKeyword && childExpression.kind === SyntaxKind.ThisKeyword
|
||||
) {
|
||||
return getSymbolAtLocation(testedExpression) === getSymbolAtLocation(childExpression);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user