Skip to content

Commit

Permalink
In Trans.js, set default value to undefined as last possible option
Browse files Browse the repository at this point in the history
  • Loading branch information
eqdominicboutin committed Jun 28, 2018
1 parent 844e7dd commit 1152ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Trans.js
Expand Up @@ -105,7 +105,7 @@ export default class Trans extends React.Component {
const reactI18nextOptions = (i18n.options && i18n.options.react) || {};
const useAsParent = parent !== undefined ? parent : reactI18nextOptions.defaultTransParent;

const defaultValue = defaults || nodesToString('', children, 0);
const defaultValue = defaults || nodesToString('', children, 0) || undefined;
const hashTransKey = reactI18nextOptions.hashTransKey;
const key = i18nKey || (hashTransKey ? hashTransKey(defaultValue) : defaultValue);
const interpolationOverride = values ? {} : { interpolation: { prefix: '#$?', suffix: '?$#' } };
Expand Down

0 comments on commit 1152ab9

Please sign in to comment.