mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Fix crash in JS when checking destructuring shorthand assignment (#25529)
This commit is contained in:
committed by
GitHub
parent
b3b6c3bdbc
commit
60c0dfeb25
@@ -21128,7 +21128,7 @@ namespace ts {
|
||||
getUnionType([removeDefinitelyFalsyTypes(leftType), rightType], UnionReduction.Subtype) :
|
||||
leftType;
|
||||
case SyntaxKind.EqualsToken:
|
||||
const special = getSpecialPropertyAssignmentKind(left.parent as BinaryExpression);
|
||||
const special = isBinaryExpression(left.parent) ? getSpecialPropertyAssignmentKind(left.parent) : SpecialPropertyAssignmentKind.None;
|
||||
checkSpecialAssignment(special, right);
|
||||
if (isJSSpecialPropertyAssignment(special)) {
|
||||
return leftType;
|
||||
|
||||
Reference in New Issue
Block a user