don't fail on undefined item key
This commit is contained in:
parent
4e0c73c2fa
commit
27c7386775
1 changed files with 2 additions and 4 deletions
|
@ -162,16 +162,14 @@ pandora.ui.metadataDialog = function(data) {
|
|||
}
|
||||
|
||||
function formatValue(key, value) {
|
||||
var item = getItemKey(key)
|
||||
return !value ? ''
|
||||
: key == 'alternativeTitles' ? value.map(function(v) {
|
||||
return v[0];
|
||||
}).join('; ')
|
||||
: key == 'runtime' ? Math.round(value / 60) + ' min'
|
||||
: key == 'productionCompany' ? value.join('; ')
|
||||
: Ox.isArray(
|
||||
getItemKey(key).type
|
||||
) ? value.join(', ')
|
||||
: value;
|
||||
: item && Ox.isArray(item.type) ? value.join(', ') : value;
|
||||
}
|
||||
|
||||
function getFormWidth() {
|
||||
|
|
Loading…
Reference in a new issue