diff --git a/static/js/pandora/utils.js b/static/js/pandora/utils.js index 30564dbe6..fc753cecd 100644 --- a/static/js/pandora/utils.js +++ b/static/js/pandora/utils.js @@ -1245,8 +1245,9 @@ pandora.unloadWindow = function() { return filter.index > -1; }).length; // indices of non-advanced find queries - indices = Ox.indicesOf(pandora.site.findKeys, function(findKey) { - var index = oneCondition(find.conditions, findKey.id, '='); + indices = find.conditions.map(function(condition) { + return oneCondition(find.conditions, condition.key, '='); + }).filter(function(index) { return index > -1; }); state = conditions == 1 && indices.length == 1 ? { diff --git a/static/js/pandora/viewSelect.js b/static/js/pandora/viewSelect.js index b211eefa1..14c2e8e89 100644 --- a/static/js/pandora/viewSelect.js +++ b/static/js/pandora/viewSelect.js @@ -7,7 +7,7 @@ pandora.ui.viewSelect = function() { sortKey = !ui.item ? 'listSort' : 'itemSort', viewKey = !ui.item ? 'listView' : 'itemView', items = pandora.site[viewKey + 's'].filter(function(view) { - return ['data', 'files'].indexOf(view.id) == -1; + return view.id != 'data' && view.id != 'files'; }).map(function(view) { return {id: view.id, title: 'View ' + view.title}; }),