Permalink
Browse files

fixed nil status nomethoderror

  • Loading branch information...
1 parent 6d28f0a commit 762e2b0ca41224b54bb07e6ff303619d6b042803 @jamesmacaulay committed Jul 9, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 backfire.rb
View
@@ -71,7 +71,7 @@ def self.update_campfire
user_statuses, user_entries = user_array.last.partition {|item| item.is_a? Status}
status = user_statuses.first
user_entries = user_entries.sort {|a,b| b.updated_at <=> a.updated_at }
- latest_updated_at = status.updated_at if status.updated_at and status.updated_at > latest_updated_at
+ latest_updated_at = status.updated_at if status and status.updated_at > latest_updated_at
latest_updated_at = user_entries.first.updated_at if user_entries.first and user_entries.first.updated_at > latest_updated_at
unless user_entries.empty? and (self.last_updated_at ? status.updated_at < self.last_updated_at : true)
update << "\n#{user.name}: #{status.message unless user_statuses.empty?}\n"

0 comments on commit 762e2b0

Please sign in to comment.