Skip to content

Commit

Permalink
Merge pull request #1092 from WebKieth/v10.13.3
Browse files Browse the repository at this point in the history
fix returning defaultValue for Trans component
  • Loading branch information
jamuhl authored Apr 19, 2020
2 parents 68fd293 + db38319 commit 8d185c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Trans.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,8 @@ export function Trans({
const defaultValue =
defaults ||
nodesToString('', children, 0, reactI18nextOptions) ||
reactI18nextOptions.transEmptyNodeValue;
reactI18nextOptions.transEmptyNodeValue ||
i18nKey;
const { hashTransKey } = reactI18nextOptions;
const key = i18nKey || (hashTransKey ? hashTransKey(defaultValue) : defaultValue);
const interpolationOverride = values ? {} : { interpolation: { prefix: '#$?', suffix: '?$#' } };
Expand Down

0 comments on commit 8d185c6

Please sign in to comment.