Skip to content

Commit

Permalink
Check for undefined localized values
Browse files Browse the repository at this point in the history
Fixes #2.
  • Loading branch information
ahaasler committed Aug 20, 2015
1 parent 5d1bdc8 commit 452ff1c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
*/
exports._c = function _c(value, lang, config, locals) {
if (locals.data['config_' + lang] != null) {
return retrieveItem(locals.data['config_' + lang], value) || retrieveItem(config, value);
var localized = retrieveItem(locals.data['config_' + lang], value)
return localized != undefined ? localized : retrieveItem(config, value);
}
return retrieveItem(config, value);
};
Expand Down

0 comments on commit 452ff1c

Please sign in to comment.