lib/floe/workflow.rb in floe-0.7.0 vs lib/floe/workflow.rb in floe-0.7.1

- old
+ new

@@ -42,10 +42,10 @@ raise Floe::InvalidWorkflowError, "Missing field \"StartAt\"" if payload["StartAt"].nil? raise Floe::InvalidWorkflowError, "\"StartAt\" not in the \"States\" field" unless payload["States"].key?(payload["StartAt"]) @payload = payload @context = context - @credentials = credentials + @credentials = credentials || {} @start_at = payload["StartAt"] @states = payload["States"].to_a.map { |name, state| State.build!(self, name, state) } @states_by_name = @states.each_with_object({}) { |state, result| result[state.name] = state }