Skip to content

Commit

Permalink
Add undefined check for options (#7006)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbouslog authored Jan 9, 2024
1 parent 5e06958 commit 44da424
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/classifier/tasks/dropdown/dropdown-dialog.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ DropdownDialog = createReactClass
return window.alert('Dropdowns must have a Title.')

# for FEMLab we want to enforce a min and max number of options
numOptions = @state.editSelect.options['*'].length
numOptions = @state.editSelect.options['*']?.length
if @props.pfeLab is false and numOptions < OPTIONS_MIN
return window.alert('Dropdowns must have at least 4 options.')
else if @props.pfeLab is false and numOptions > OPTIONS_MAX
Expand Down

0 comments on commit 44da424

Please sign in to comment.