Skip to content

Commit

Permalink
Fix missing hoisted expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Feb 15, 2024
1 parent a2b5a8d commit 2f1d027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/babel/core/transform-jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ function extractJSXExpressionsFromJSXElement(
closingElement.get('name').replaceWith(replacement);
}
}
extractJSXExpressionsFromAttributes(state, path);
}

function extractJSXExpressionsFromJSXExpressionContainer(
Expand All @@ -240,6 +239,7 @@ function extractJSXExpressions(
): void {
if (isPathValid(path, t.isJSXElement)) {
extractJSXExpressionsFromJSXElement(state, path);
extractJSXExpressionsFromAttributes(state, path);
}
const children = path.get('children');
for (let i = 0, len = children.length; i < len; i++) {
Expand Down

0 comments on commit 2f1d027

Please sign in to comment.