Permalink
Browse files

Fix: don't call id on nil

  • Loading branch information...
1 parent 9c6d645 commit 89958f54488ffe7b5891e661e481654f3d3fb124 Stephen Caudill committed Oct 16, 2009
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/session.rb
View
@@ -51,7 +51,8 @@ def iteration_start_timer
end
def iteration_short_breaks_count
- short_breaks.count(:id.gte => iteration_start_timer.id)
+ return 0 unless iteration_start_timer
+ short_breaks.count(:id.gte => iteration_start_timer[:id])
end
def next_timer

0 comments on commit 89958f5

Please sign in to comment.