forked from 0x2620/pandora
don't output null, use empty string instead, fixes #3168
This commit is contained in:
parent
f93ece1ab7
commit
8a0098ec1f
1 changed files with 9 additions and 5 deletions
|
@ -145,7 +145,7 @@ pandora.ui.list = function() {
|
|||
info.css({width: size * 0.75 + 'px'});
|
||||
}
|
||||
} else {
|
||||
info = data[sortKey];
|
||||
info = data[sortKey] || '';
|
||||
}
|
||||
}
|
||||
size = size || 128;
|
||||
|
@ -192,7 +192,9 @@ pandora.ui.list = function() {
|
|||
info = data['year'] || data['date'] || '';
|
||||
} else {
|
||||
format = pandora.getSortKeyData(sortKey).format;
|
||||
if (format) {
|
||||
if (Ox.isUndefined(data[sortKey]) || Ox.isNull(data[sortKey])) {
|
||||
info = '';
|
||||
} else if (format) {
|
||||
info = (
|
||||
/^color/.test(format.type.toLowerCase()) ? Ox.Theme : Ox
|
||||
)['format' + Ox.toTitleCase(format.type)].apply(
|
||||
|
@ -202,7 +204,7 @@ pandora.ui.list = function() {
|
|||
info.css({width: size * 0.75 + 'px'});
|
||||
}
|
||||
} else {
|
||||
info = data[sortKey];
|
||||
info = data[sortKey] || '';
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
@ -279,7 +281,9 @@ pandora.ui.list = function() {
|
|||
info = data['year'] || data['date'] || '';
|
||||
} else {
|
||||
format = pandora.getSortKeyData(sortKey).format;
|
||||
if (format) {
|
||||
if (Ox.isUndefined(data[sortKey]) || Ox.isNull(data[sortKey])) {
|
||||
info = '';
|
||||
} else if (format) {
|
||||
info = (
|
||||
/^color/.test(format.type.toLowerCase()) ? Ox.Theme : Ox
|
||||
)['format' + Ox.toTitleCase(format.type)].apply(
|
||||
|
@ -289,7 +293,7 @@ pandora.ui.list = function() {
|
|||
info.css({width: size * 0.75 + 'px'});
|
||||
}
|
||||
} else {
|
||||
info = data[sortKey];
|
||||
info = data[sortKey] || '';
|
||||
}
|
||||
}
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue