Skip to content

Commit

Permalink
only return children as list if i18nIsDynamicList prop is true
Browse files Browse the repository at this point in the history
  • Loading branch information
nicegamer7 committed Aug 10, 2023
1 parent d5375b5 commit 5e34bdd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TransWithoutContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ function hasChildren(node, checkLength) {

function getChildren(node) {
if (!node) return [];
return getAsArray(node.props ? node.props.children : node.children);
const children = node.props ? node.props.children : node.children;
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
}

function hasValidReactChildren(children) {
Expand Down

0 comments on commit 5e34bdd

Please sign in to comment.