dont format null values, fixes #116

This commit is contained in:
j 2016-01-11 12:53:14 +05:30
parent 9253e65e79
commit 9a3c457d6a
1 changed files with 5 additions and 3 deletions

View File

@ -16,9 +16,11 @@ oml.ui.gridView = function() {
width = Math.round(ratio >= 1 ? size : size * ratio),
height = Math.round(ratio <= 1 ? size : size / ratio),
sortKey = sort[0].key,
info = Ox.getObjectById(oml.config.sortKeys, sortKey).format(
Ox.contains(['title', 'random'], sortKey)
? (data.author || '') : data[sortKey]
info = Ox.isNull(data[sortKey])
? ''
: Ox.getObjectById(oml.config.sortKeys, sortKey).format(
Ox.contains(['title', 'random'], sortKey)
? (data.author || '') : data[sortKey]
);
size = size || 128;
return {