mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(transformer/react-jsx): missing import jsxs in nested fragment (#1218)
This commit is contained in:
parent
a0f40cb058
commit
48242367bb
2 changed files with 6 additions and 2 deletions
|
|
@ -158,7 +158,12 @@ impl<'a> ReactJsx<'a> {
|
|||
}
|
||||
JSXElementOrFragment::Element(_) if need_jsxs => self.add_import_jsxs(),
|
||||
JSXElementOrFragment::Element(_) => self.add_import_jsx(),
|
||||
JSXElementOrFragment::Fragment(_) => self.add_import_fragment(),
|
||||
JSXElementOrFragment::Fragment(_) => {
|
||||
self.add_import_fragment();
|
||||
if need_jsxs {
|
||||
self.add_import_jsxs();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -875,7 +875,6 @@ Passed: 266/1113
|
|||
* react-automatic/arrow-functions/input.js
|
||||
* react-automatic/optimisation.react.constant-elements/input.js
|
||||
* react-automatic/should-add-quotes-es3/input.js
|
||||
* react-automatic/should-allow-nested-fragments/input.js
|
||||
* react-automatic/should-disallow-spread-children/input.js
|
||||
* react-automatic/should-disallow-valueless-key/input.js
|
||||
* react-automatic/should-disallow-xml-namespacing/input.js
|
||||
|
|
|
|||
Loading…
Reference in a new issue