mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
fix(44249): JSX: "extract to constant" generates invalid code when using fragment syntax (#44252)
Fixes https://github.com/microsoft/TypeScript/issues/44249
This commit is contained in:
@@ -2002,6 +2002,6 @@ namespace ts.refactor.extractSymbol {
|
||||
}
|
||||
|
||||
function isInJSXContent(node: Node) {
|
||||
return (isJsxElement(node) || isJsxSelfClosingElement(node) || isJsxFragment(node)) && isJsxElement(node.parent);
|
||||
return (isJsxElement(node) || isJsxSelfClosingElement(node) || isJsxFragment(node)) && (isJsxElement(node.parent) || isJsxFragment(node.parent));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user