deal with secondary_options that can be nil

This commit is contained in:
clemkeirua 2020-01-28 09:18:54 +01:00
parent 65b4bcf3a1
commit 696e39761f

View file

@ -61,6 +61,6 @@ class Champs::LinkedDropDownListChamp < Champ
end
def has_secondary_options_for_primary?
primary_value.present? && secondary_options[primary_value].any?(&:present?)
primary_value.present? && secondary_options[primary_value]&.any?(&:present?)
end
end