mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 22:42:32 -05:00
fix empty option condition
This commit is contained in:
1 parent
0375dad7c9
commit
57d63dd2f2
1 file changed
+2
-2
@@ -297,13 +297,13 @@ module Submitters
|
||||
option = field['options'].find { |o| o['uuid'] == condition['value'] }
|
||||
values = Array.wrap(submitter_values[condition['field_uuid']])
|
||||
|
||||
values.include?(option['value'].presence || "#{I18n.t('option')} #{field['options'].index(option)}")
|
||||
values.include?(option['value'].presence || "#{I18n.t('option')} #{field['options'].index(option) + 1}")
|
||||
when 'not_equal', 'does_not_contain'
|
||||
field = fields_uuid_index[condition['field_uuid']]
|
||||
option = field['options'].find { |o| o['uuid'] == condition['value'] }
|
||||
values = Array.wrap(submitter_values[condition['field_uuid']])
|
||||
|
||||
values.exclude?(option['value'].presence || "#{I18n.t('option')} #{field['options'].index(option)}")
|
||||
values.exclude?(option['value'].presence || "#{I18n.t('option')} #{field['options'].index(option) + 1}")
|
||||
else
|
||||
true
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user