Skip to content

Commit

Permalink
Partial backport of #2698
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Aug 12, 2023
1 parent 2a0e80f commit e416121
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/blacklight/document_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ def initialize(document: nil, presenter: nil,
embed_component: nil,
thumbnail_component: nil,
counter: nil, document_counter: nil, counter_offset: 0,
show: false)
show: false, **args)
if presenter.nil? && document.nil?
raise ArgumentError, 'missing keyword: :document or :presenter'
end

@document = document || presenter&.document
@document = document || presenter&.document || args[self.class.collection_parameter]
@presenter = presenter

@component = component
Expand Down

0 comments on commit e416121

Please sign in to comment.