fix(dossier): do not crash when a repetition is empty

This commit is contained in:
Paul Chavard 2023-02-01 23:55:09 +01:00 committed by Colin Darie
parent bfb96b6cb3
commit 4ec9a4be37

View file

@ -1,3 +1,3 @@
= fields_for @champ.input_name, @champ do |form| - if @champs.present?
= turbo_stream.append dom_id(@champ, :rows), render(EditableChamp::RepetitionRowComponent.new(form: form, champ: @champ, row: @champs)) = fields_for @champ.input_name, @champ do |form|
= turbo_stream.append dom_id(@champ, :rows), render(EditableChamp::RepetitionRowComponent.new(form: form, champ: @champ, row: @champs))