Fix top level logical assignment leak (#40536)

* Fix leaking top level logical assignment

* Fix leaking top level logical assignment
This commit is contained in:
Wenlu Wang authored and GitHub committed 2022-03-14 10:48:31 -07:00
1 parent 4a58fbce17
commit 5f017df609
11 files changed
+270 -1

No files matched your search

-1
View File
@@ -1069,7 +1069,6 @@ namespace ts {
node = node.parent;
}
return !isStatementCondition(node) &&
!isLogicalAssignmentExpression(node.parent) &&
!isLogicalExpression(node.parent) &&
!(isOptionalChain(node.parent) && node.parent.expression === node);
}