Skip to content

Commit

Permalink
Support choices that do not have a default defined
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrock committed May 22, 2024
1 parent e0b0882 commit 15a3630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/floe/workflow/states/choice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def validate_state_choices!
end

def validate_state_default!
raise Floe::InvalidWorkflowError, "\"Default\" not in \"States\"" unless workflow.payload["States"].include?(payload["Default"])
raise Floe::InvalidWorkflowError, "\"Default\" not in \"States\"" if payload["Default"] && !workflow.payload["States"].include?(payload["Default"])
end
end
end
Expand Down

0 comments on commit 15a3630

Please sign in to comment.