diff --git a/app/components/spotlight/icon_component.rb b/app/components/spotlight/icon_component.rb
index ce278f1c9..e87514f32 100644
--- a/app/components/spotlight/icon_component.rb
+++ b/app/components/spotlight/icon_component.rb
@@ -3,10 +3,10 @@
module Spotlight
# Displays the document
class IconComponent < Blacklight::Icons::IconComponent
- if Blacklight.version < '8.0'
- # Work around https://github.com/projectblacklight/blacklight/issues/3232 (fixed in Blacklight 8.0)
+ if Blacklight.version < '7.39'
+ # Work around https://github.com/projectblacklight/blacklight/issues/3232 (fixed in Blacklight 7.39)
def classes
- (@classes - ['blacklight-icons-'] + ["blacklight-icons-#{name}"]).uniq
+ ((@classes || (super if defined?(super)) || []) - ['blacklight-icons-'] + ["blacklight-icons-#{name}"]).uniq
end
end
end
diff --git a/app/views/spotlight/catalog/edit.html.erb b/app/views/spotlight/catalog/edit.html.erb
index 4ec2fc215..0ee9be997 100644
--- a/app/views/spotlight/catalog/edit.html.erb
+++ b/app/views/spotlight/catalog/edit.html.erb
@@ -1,7 +1,7 @@
<%- view_config = blacklight_config.view_config(action_name: :edit) %>
- <%= render (view_config.document_component || Blacklight::DocumentComponent).new(presenter: document_presenter(@document), classes: ['col-md-8'], component: :div, show: true, actions: false, partials: view_config.partials) do |component| %>
+ <%= render (view_config.document_component || Blacklight::DocumentComponent).new((Blacklight.version > '8.0' ? :document : :presenter) => document_presenter(@document), classes: ['col-md-8'], component: :div, show: true, actions: false, partials: view_config.partials) do |component| %>
<% component.with_title(as: 'h1', classes: '', link_to_document: false) %>
<% component.with_body do %>
<% view_config.partials.each do |view_partial| %>
diff --git a/spec/views/spotlight/pages/show.html.erb_spec.rb b/spec/views/spotlight/pages/show.html.erb_spec.rb
index 8c9e245c0..7d500abdb 100644
--- a/spec/views/spotlight/pages/show.html.erb_spec.rb
+++ b/spec/views/spotlight/pages/show.html.erb_spec.rb
@@ -35,7 +35,7 @@
end
context 'when rendering with layout' do
- let(:blacklight_config) { Blacklight::Configuration.new }
+ let(:blacklight_config) { Blacklight::Configuration.new header_component: Spotlight::HeaderComponent }
let(:document) { SolrDocument.new id: 'xyz', format: 'a' }
let(:presenter) { Blacklight::ShowPresenter.new(document, view, blacklight_config) }