Skip to content

Commit

Permalink
Update defaults.js
Browse files Browse the repository at this point in the history
  • Loading branch information
messerm committed Dec 20, 2018
1 parent 85637ee commit 37b846e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/defaults.js
Expand Up @@ -37,9 +37,15 @@ export function get() {
appendNamespaceToMissingKey: false,
appendNamespaceToCIMode: false,
overloadTranslationOptionHandler: function handle(args) {
const ret = {};
var ret = {};
if (args[1]) ret.defaultValue = args[1];
if (args[2]) ret.tDescription = args[2];
if (typeof args[2] === 'string') ret.tDescription = args[2];
if (typeof args[2] === 'object' || typeof args[3] === 'object') {
var options = args[3] || args[2];
Object.keys(options).forEach(function(key) {
ret[key] = options[key];
});
}
return ret;
},
interpolation: {
Expand Down

0 comments on commit 37b846e

Please sign in to comment.