mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-04 02:31:33 +00:00
selected could be nil if no columns are selected
This commit is contained in:
@@ -4,6 +4,6 @@ class MultipleCheckedSelectComponent < ViewComponent::Base
|
||||
def initialize(name:, options:, selected:)
|
||||
@name = name
|
||||
@options = options.map { |option| [option[0], option[1].to_sym] }
|
||||
@selected = selected.map(&:to_sym)
|
||||
@selected = selected.nil? ? [] : selected.map(&:to_sym)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user