mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-30 11:24:49 -05:00
fix(51245): Class with parameter decorator in arrow function causes "convert to default export" refactoring failure (#51256)
* fix(51245): don't rely on parent nodes in formatting rules * check existing parent node
This commit is contained in:
@@ -732,10 +732,10 @@ namespace ts.formatting {
|
||||
}
|
||||
|
||||
function nodeIsInDecoratorContext(node: Node): boolean {
|
||||
while (isExpressionNode(node)) {
|
||||
while (node && isExpression(node)) {
|
||||
node = node.parent;
|
||||
}
|
||||
return node.kind === SyntaxKind.Decorator;
|
||||
return node && node.kind === SyntaxKind.Decorator;
|
||||
}
|
||||
|
||||
function isStartOfVariableDeclarationList(context: FormattingContext): boolean {
|
||||
|
||||
Reference in New Issue
Block a user