keys might be undefined

This commit is contained in:
j 2015-05-25 12:51:11 +00:00
parent e063cc7020
commit 5cc23093ef

View file

@ -619,7 +619,7 @@ pandora.ui.infoView = function(data) {
var year = item.year || Ox._('Unknown Year');
if (key == 'name' && result.data.items.length > 1) {
item.roles = nameKeys.filter(function(nameKey) {
return Ox.contains(item[nameKey], value);
return item[nameKey] && Ox.contains(item[nameKey], value);
});
if (roles.length == 1 && Ox.isEqual(item.roles, roles)) {
delete item.roles;