mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 01:04:49 -05:00
Fixed crash in classFields transform related to broken bodyless constructors (#59280)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
09e47d0638
commit
ca4ef16c8f
@@ -2416,11 +2416,11 @@ export function transformClassFields(context: TransformationContext): (x: Source
|
||||
factory.createBlock(
|
||||
setTextRange(
|
||||
factory.createNodeArray(statements),
|
||||
/*location*/ constructor ? constructor.body!.statements : node.members,
|
||||
/*location*/ constructor?.body?.statements ?? node.members,
|
||||
),
|
||||
multiLine,
|
||||
),
|
||||
/*location*/ constructor ? constructor.body : undefined,
|
||||
/*location*/ constructor?.body,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user