Skip to content

Commit 3bbfea1

Browse files
committed
fix: replace RenderFragment with RenderChildren in TransNoContext component
1 parent da1ba2b commit 3bbfea1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/react/src/TransNoContext.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function TransNoContext(
7070
}
7171

7272
const FallbackComponent: React.ComponentType<TransRenderProps> =
73-
defaultComponent || RenderFragment
73+
defaultComponent || RenderChildren
7474

7575
const i18nProps: TransRenderProps = {
7676
id,
@@ -111,9 +111,8 @@ export function TransNoContext(
111111
return <Component {...i18nProps}>{translation}</Component>
112112
}
113113

114-
const RenderFragment = ({ children }: TransRenderProps) => {
115-
// cannot use React.Fragment directly because we're passing in props that it doesn't support
116-
return <>{children}</>
114+
const RenderChildren = ({ children }: TransRenderProps) => {
115+
return children
117116
}
118117

119118
const getInterpolationValuesAndComponents = (props: TransProps) => {

0 commit comments

Comments
 (0)