browser: handle undefined

This commit is contained in:
rlx 2016-01-17 14:00:16 +05:30
parent fb80c952ee
commit fd96d2da37

View file

@ -17,7 +17,7 @@ oml.ui.browser = function() {
width = Math.round(ratio >= 1 ? size : size * ratio),
height = Math.round(ratio <= 1 ? size : size / ratio),
sortKey = sort[0].key,
info = Ox.isNull(data[sortKey])
info = Ox.isNull(data[sortKey]) || Ox.isUndefined(data[sortKey])
? ''
: Ox.contains(['title', 'random'], sortKey)
? (data.author || []).join(', ')