empy array values should be empty arrays

This commit is contained in:
j 2012-01-03 14:33:21 +05:30
parent 08e7c6f939
commit aaa8f4f1ca
2 changed files with 3 additions and 3 deletions

View file

@ -497,8 +497,8 @@ pandora.ui.infoView = function(data) {
var edit = {id: data.id};
if (key == 'title') {
Ox.extend(edit, parseTitle(value));
} else if (key == 'director' || key == 'country') {
edit[key] = value.split(', ');
} else if(['director', 'country'].indexOf(key) > -1) {
edit[key] = value ? value.split(', ') : [];
} else {
edit[key] = value;
}

View file

@ -389,7 +389,7 @@ pandora.ui.infoView = function(data) {
var edit = {id: data.id};
if (key == 'title') {
Ox.extend(edit, parseTitle(value));
} else if(['director', 'country', 'language', 'category'].indexOf(key) >= 0) {
} else if(['director', 'country', 'language', 'category'].indexOf(key) > -1) {
edit[key] = value ? value.split(', ') : [];
} else {
edit[key] = value;