fix a bug in UI.js

This commit is contained in:
rolux 2014-02-06 14:07:36 +00:00
parent a755177763
commit a64c8d612b

View file

@ -164,6 +164,9 @@ pandora.UI = (function() {
} }
if (args.edit) { if (args.edit) {
if (!pandora.user.ui.edits[args.edit]) {
add['edits.' + that.encode(args.edit)] = {};
}
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]
@ -171,6 +174,7 @@ pandora.UI = (function() {
: value; : value;
}); });
} }
if (args.text) { if (args.text) {
add['texts.' + that.encode(args.text)] = Ox.map(textSettings, function(value, key) { add['texts.' + that.encode(args.text)] = Ox.map(textSettings, function(value, key) {
var textsKey = 'texts.' + that.encode(args.text), var textsKey = 'texts.' + that.encode(args.text),