Skip to content

Commit 78a3b69

Browse files
recursive call to check inner expr is reorderable
1 parent ebf4880 commit 78a3b69

File tree

1 file changed

+6
-1
lines changed
  • compiler/packages/babel-plugin-react-compiler/src/HIR

1 file changed

+6
-1
lines changed

compiler/packages/babel-plugin-react-compiler/src/HIR/BuildHIR.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3081,7 +3081,12 @@ function isReorderableExpression(
30813081
return true;
30823082
}
30833083
}
3084-
case 'TSInstantiationExpression':
3084+
case 'TSInstantiationExpression': {
3085+
const innerExpr = (expr as NodePath<t.TSInstantiationExpression>).get(
3086+
'expression',
3087+
) as NodePath<t.Expression>;
3088+
return isReorderableExpression(builder, innerExpr, allowLocalIdentifiers);
3089+
}
30853090
case 'RegExpLiteral':
30863091
case 'StringLiteral':
30873092
case 'NumericLiteral':

0 commit comments

Comments
 (0)