forked from 0x2620/pandora
edits and texts can have undefined edits/texts keys too
This commit is contained in:
parent
77270873e6
commit
d80455cc86
1 changed files with 8 additions and 2 deletions
|
@ -188,7 +188,10 @@ pandora.UI = (function() {
|
||||||
Ox.forEach(editSettings, function(value, key) {
|
Ox.forEach(editSettings, function(value, key) {
|
||||||
var editsKey = 'edits.' + that.encode(args.edit) + '.' + key;
|
var editsKey = 'edits.' + that.encode(args.edit) + '.' + key;
|
||||||
add[editsKey] = editsKey in args ? args[editsKey]
|
add[editsKey] = editsKey in args ? args[editsKey]
|
||||||
: pandora.user.ui.edits[args.edit] ? pandora.user.ui.edits[args.edit][key]
|
: (
|
||||||
|
pandora.user.ui.edits[args.edit]
|
||||||
|
&& !Ox.isUndefined(pandora.user.ui.edits[args.edit][key])
|
||||||
|
) ? pandora.user.ui.edits[args.edit][key]
|
||||||
: value;
|
: value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -217,7 +220,10 @@ pandora.UI = (function() {
|
||||||
textsSubKey = textsKey + '.' + key;
|
textsSubKey = textsKey + '.' + key;
|
||||||
return textsKey in args && key in args[textsKey] ? args[textsKey][key]
|
return textsKey in args && key in args[textsKey] ? args[textsKey][key]
|
||||||
: textsSubKey in args ? args[textSubKey]
|
: textsSubKey in args ? args[textSubKey]
|
||||||
: pandora.user.ui.texts[args.text] ? pandora.user.ui.texts[args.text][key]
|
: (
|
||||||
|
pandora.user.ui.texts[args.text]
|
||||||
|
&& !Ox.isUndefined(pandora.user.ui.texts[args.text][key])
|
||||||
|
} ? pandora.user.ui.texts[args.text][key]
|
||||||
: value;
|
: value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue