From 3c24b38ddfe3f72662ab018c3a9c60c0765217c1 Mon Sep 17 00:00:00 2001 From: rlx Date: Thu, 14 Jan 2016 15:55:29 +0530 Subject: [PATCH] edit metadata: send [], not [''] --- static/js/infoView.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/static/js/infoView.js b/static/js/infoView.js index 23515ca..b0fbe8d 100644 --- a/static/js/infoView.js +++ b/static/js/infoView.js @@ -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];