forked from 0x2620/pandora
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) {
|
function formatValue(key, value) {
|
||||||
|
var item = getItemKey(key)
|
||||||
return !value ? ''
|
return !value ? ''
|
||||||
: key == 'alternativeTitles' ? value.map(function(v) {
|
: key == 'alternativeTitles' ? value.map(function(v) {
|
||||||
return v[0];
|
return v[0];
|
||||||
}).join('; ')
|
}).join('; ')
|
||||||
: key == 'runtime' ? Math.round(value / 60) + ' min'
|
: key == 'runtime' ? Math.round(value / 60) + ' min'
|
||||||
: key == 'productionCompany' ? value.join('; ')
|
: key == 'productionCompany' ? value.join('; ')
|
||||||
: Ox.isArray(
|
: item && Ox.isArray(item.type) ? value.join(', ') : value;
|
||||||
getItemKey(key).type
|
|
||||||
) ? value.join(', ')
|
|
||||||
: value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getFormWidth() {
|
function getFormWidth() {
|
||||||
|
|
Loading…
Reference in a new issue