File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
app/components/blacklight_range_limit Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,16 @@ class RangeFacetComponent < Blacklight::Component
6
6
7
7
def initialize ( facet_field :, layout : nil , classes : BlacklightRangeLimit . classes )
8
8
@facet_field = facet_field
9
- @layout = layout == false ? Blacklight ::FacetFieldNoLayoutComponent : Blacklight ::FacetFieldComponent
9
+ @layout = if layout == false
10
+ Blacklight ::FacetFieldNoLayoutComponent
11
+ elsif layout
12
+ layout
13
+ elsif defined? ( Blacklight ::Facets ::FacetFieldComponent )
14
+ Blacklight ::Facets ::FacetFieldComponent # Blacklight 9
15
+ else
16
+ Blacklight ::FacetFieldComponent # Blacklight < 9
17
+ end
18
+
10
19
@classes = classes
11
20
end
12
21
@@ -39,7 +48,7 @@ def load_distribution_link
39
48
min = @facet_field . selected_range_facet_item &.value &.begin || @facet_field . min
40
49
max = @facet_field . selected_range_facet_item &.value &.end || @facet_field . max
41
50
42
- return nil unless ( min && max )
51
+ return nil unless min && max
43
52
44
53
range_limit_url ( range_start : min , range_end : max )
45
54
end
You can’t perform that action at this time.
0 commit comments