Skip to content

Commit 41919c7

Browse files
Fix element.ref access issue with react 19 (#1846)
1 parent 19fcf00 commit 41919c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TransWithoutContext.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, s
170170
{
171171
...props,
172172
key: i,
173-
ref: c.ref,
173+
ref: c.props.ref ?? c.ref, // ref is a prop in react >= v19
174174
},
175175
isVoid ? null : inner,
176176
);

0 commit comments

Comments
 (0)