Skip to content

Commit

Permalink
Correct bad non-hash range param for BL 7.x
Browse files Browse the repository at this point in the history
This branch correction is not necessary in BL 8, not sure why
  • Loading branch information
jrochkind committed Dec 2, 2024
1 parent 35646d7 commit 204f619
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/presenters/blacklight_range_limit/filter_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 204f619

Please sign in to comment.