edit metadata: send [], not ['']

This commit is contained in:
rlx 2016-01-14 15:55:29 +05:30
parent 996d3dc01f
commit 3c24b38ddf

View file

@ -285,14 +285,14 @@ oml.ui.infoView = function(externalData, isMixed) {
&& Ox.decodeHTMLEntities(value).split(separator).some(function(value) {
return Ox.endsWith(value, ' (Ed.)');
});
return Ox.unique(
return value ? Ox.unique(
Ox.decodeHTMLEntities(value).split(separator).map(function(value) {
value = Ox.encodeHTMLEntities(value);
return isEditor
? value.replace(/ \(Ed\.\)$/, '') + ' (Ed.)'
: value;
})
);
) : [];
}
function toggleCoverSize(ratio) {
@ -738,9 +738,7 @@ oml.ui.infoView = function(externalData, isMixed) {
var edit = Ox.extend(
{id: !isMultiple ? data.id : ui.listSelection},
key,
Ox.contains(arrayKeys, key)
? splitValue(value || '', key)
: value
Ox.contains(arrayKeys, key) ? splitValue(value, key) : value
);
if (!Ox.isEqual(edit[key], data[key])) {
data[key] = edit[key];