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:51:06 +01:00
parent 4b740f8f29
commit 5cf90eb103
No known key found for this signature in database

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