diff --git a/app/controllers/concerns/facetable.rb b/app/controllers/concerns/facetable.rb index 1c96c607f..6777a50ad 100644 --- a/app/controllers/concerns/facetable.rb +++ b/app/controllers/concerns/facetable.rb @@ -109,7 +109,7 @@ def facet_by_affiliation(arr) arr.map do |hsh| { "id" => hsh["key"], - "title" => affiliations.find { |a| a["id"] == hsh["key"] }.to_h["name"], + "title" => affiliations.find { |a| a["id"] == hsh["key"] }.to_h["name"] || hsh["key"], "count" => hsh["doc_count"] } end end