Skip to content

Commit

Permalink
Don't add spans as children of spans
Browse files Browse the repository at this point in the history
  • Loading branch information
behowell committed Mar 15, 2024
1 parent fd5a166 commit c5dc4ed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const jsxPlatformAdapter = (reactJsx: JSXRuntime): JSXRuntime => {
}

// TODO figure out which types need to wrap children in a span.
if (props?.children) {
if (type !== 'span' && props?.children) {
let modifiedChildren = false;
const children = React.Children.map(props.children, child => {
if (typeof child === 'string') {
Expand Down

0 comments on commit c5dc4ed

Please sign in to comment.