Skip to content

Commit

Permalink
rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
jamuhl committed Dec 7, 2020
1 parent 8db49fa commit 9b082ae
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### 11.8.0

- typescript: Make the translation function fully type-safe [1193](https://github.com/i18next/react-i18next/pull/1193)
- trans should work with misleading overloaded empty elements in components [1206](https://github.com/i18next/react-i18next/pull/1206)

### 11.7.4

- fixes passing interpolations options via Trans components tOptions prop [1204](https://github.com/i18next/react-i18next/pull/1204)
Expand Down
6 changes: 3 additions & 3 deletions react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,11 +637,11 @@
return hasValidReactChildren(childs) && mappedChildren.length === 0 ? childs : mappedChildren;
}

function pushTranslatedJSX(child, inner, mem, i) {
function pushTranslatedJSX(child, inner, mem, i, isVoid) {
if (child.dummy) child.children = inner;
mem.push(React__default.cloneElement(child, _objectSpread2(_objectSpread2({}, child.props), {}, {
key: i
}), inner));
}), isVoid ? undefined : inner));
}

function mapAST(reactNode, astNode, rootReactNode) {
Expand Down Expand Up @@ -677,7 +677,7 @@
if (isKnownComponent) {
var _inner2 = renderInner(child, node, rootReactNode);

pushTranslatedJSX(child, _inner2, mem, i);
pushTranslatedJSX(child, _inner2, mem, i, node.voidElement);
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
if (node.voidElement) {
mem.push(React__default.createElement(node.name, {
Expand Down
Loading

0 comments on commit 9b082ae

Please sign in to comment.