diff --git a/app/presenters/blacklight_range_limit/filter_field.rb b/app/presenters/blacklight_range_limit/filter_field.rb index 48f7c42..bf1e36a 100644 --- a/app/presenters/blacklight_range_limit/filter_field.rb +++ b/app/presenters/blacklight_range_limit/filter_field.rb @@ -50,7 +50,12 @@ def remove(item) def values(except: []) params = search_state.params param_key = filters_key - range = if params.dig(param_key, config.key).is_a? Range + range = if !params.try(:dig, param_key).respond_to?(:dig) + # bad data, not a hash at all, correct it, only necessary in BL + # prior to 8.x, not sure why. + params.delete(param_key) + nil + elsif params.dig(param_key, config.key).is_a? Range params.dig(param_key, config.key) elsif params.dig(param_key, config.key).is_a? Hash b_bound = params.dig(param_key, config.key, :begin).presence