From 6a6a3e0b4705945473bf5a2ecd1ca3b60853fbf6 Mon Sep 17 00:00:00 2001 From: Chris Beer Date: Sun, 6 Aug 2017 08:47:05 -0700 Subject: [PATCH] Use Hash#key instead of Hash#index --- lib/blacklight/solr/response/spelling.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/blacklight/solr/response/spelling.rb b/lib/blacklight/solr/response/spelling.rb index 75f5958b12..26399b40cc 100644 --- a/lib/blacklight/solr/response/spelling.rb +++ b/lib/blacklight/solr/response/spelling.rb @@ -73,8 +73,8 @@ def collation return unless spellcheck && spellcheck[:suggestions] suggestions = spellcheck[:suggestions] - if suggestions.index("collation") - suggestions[suggestions.index("collation") + 1] + if suggestions.key?("collation") + suggestions[suggestions.key("collation") + 1] elsif spellcheck.key?("collations") spellcheck['collations'].last end