Skip to content

Commit

Permalink
build
Browse files Browse the repository at this point in the history
  • Loading branch information
adrai committed Nov 26, 2024
1 parent 9f27377 commit 4cd54b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,10 @@
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 componentKey = components[c].key || c;
const comp = react.cloneElement(components[c], {
key: componentKey
});
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() {
return react.createElement(react.Fragment, null, comp);
Expand Down
Loading

0 comments on commit 4cd54b1

Please sign in to comment.