Permalink
Browse files

return nil when there are no applicable transitions

  • Loading branch information...
1 parent 2eb5a32 commit f60c862c510e5aaed185071c6f12d70f83295cc6 @Najaf Najaf committed Mar 2, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/dumb-answers/state.rb
View
1 lib/dumb-answers/state.rb
@@ -29,6 +29,7 @@ def answer!(question_id, answer_code)
end
end
+ return nil if applicable_transitions == []
next_node_id = applicable_transitions.first['next']
@current = @nodes[next_node_id]
end

0 comments on commit f60c862

Please sign in to comment.