Browse files

Merge pull request #27 from Keithbsmiley/data-fix

Make sure data exists before using it
  • Loading branch information...
EmmanuelOga committed Jul 29, 2014
2 parents a1cf828 + f5c0873 commit 9e13dc3399f7429713b5213c5ee77bedf01def31
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/firering/requests.rb
@@ -27,7 +27,7 @@ def room(id, &callback)
# multi: if true, gets all the users from each room as Firering::User objects
def rooms(&callback)
http(:get, "/rooms.json") do |data, http|
if data[:rooms]
if data && data[:rooms][:rooms].map{|room| Firering::Room.instantiate(self, room)}) if callback

0 comments on commit 9e13dc3

Please sign in to comment.