Skip to content

Commit

Permalink
Avoid iterating if webhook is not an Array
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Sep 19, 2015
1 parent 09eebf9 commit f7e1a62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ def handle_child_close(msg, exit_status=nil)

if ['err', 'done', 'relayed'].include? new_state
# Send a webhook if there is a web hook
if msg.include? 'post_run_webhook'
if msg['post_run_webhook'].is_a? Array
msg['post_run_webhook'].each do |wh|
webhook_message(wh, msg, new_state)
end
Expand Down

0 comments on commit f7e1a62

Please sign in to comment.