Merge pull request #11054 from tchak/fix-drop-down-other

fix(champ): no crash when drop_down_list with other champ value_json is nil
This commit is contained in:
Paul Chavard 2024-11-18 09:00:47 +00:00 committed by GitHub
commit 28ca26b7ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,6 +12,6 @@ class TypesDeChamp::DropDownListTypeDeChamp < TypesDeChamp::TypeDeChampBase
end
def champ_with_other_value?(champ)
drop_down_other? && champ.value_json['other']
drop_down_other? && champ.value_json&.fetch('other', false)
end
end