Skip to content

Commit dc04625

Browse files
committed
Remove redundant conditional check
The modified code was and is only executed when `condition.nil?` is true (line 20). Thus, the ternary operator always evaluated to the else.
1 parent e651186 commit dc04625

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/views/org_admin/conditions/_form.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<div class="col-md-9 pe-2">
2424
<div class="form-label bold"><%= _('Option') %></div>
2525
<%= select_tag(:question_option, options_from_collection_for_select(question.question_options.sort_by(&:number), "id", "text",
26-
condition.present? ? condition[:question_option_id] : question.question_options.sort_by(&:number)[0]), {class: 'form-select regular', 'data-bs-style': 'dropdown-toggle bg-white px-4 py-3', name: name_start + "[question_option][]"}) %>
26+
question.question_options.sort_by(&:number)[0]), {class: 'form-select regular', 'data-bs-style': 'dropdown-toggle bg-white px-4 py-3', name: name_start + "[question_option][]"}) %>
2727
</div>
2828
<div class="col-md-3 pe-2">
2929
<div class="form-label bold"><%= _('Action') %></div>

0 commit comments

Comments
 (0)