Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Oct 21, 2024
1 parent e05425e commit eaf7780
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 15.1.0

- fix: `<Trans />` warns 'Each child in a list should have a unique "key" prop.' for react 19 [1806](https://github.com/i18next/next-i18next/pull/1806)

### 15.0.3

- try to fix [unexpected token issue](https://github.com/i18next/next-i18next/issues/2302)
Expand Down
3 changes: 3 additions & 0 deletions react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@
const translation = key ? t(key, combinedTOpts) : defaultValue;
if (components) {
Object.keys(components).forEach(c => {
if (!components[c].key) components[c] = react.cloneElement(components[c], {
key: c
});
const comp = components[c];
if (typeof comp.type === 'function' || !comp.props || !comp.props.children || translation.indexOf(`${c}/>`) < 0 && translation.indexOf(`${c} />`) < 0) return;
function Componentized() {
Expand Down
Loading

0 comments on commit eaf7780

Please sign in to comment.