From 1152ab9214787bec7045a73c1aeb4848f1ad8fc4 Mon Sep 17 00:00:00 2001 From: Dominic Boutin Date: Thu, 28 Jun 2018 10:45:29 -0400 Subject: [PATCH] In Trans.js, set default value to undefined as last possible option --- src/Trans.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Trans.js b/src/Trans.js index 3071c4c0..da7f69f8 100644 --- a/src/Trans.js +++ b/src/Trans.js @@ -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: '?$#' } };