Skip to content

Commit

Permalink
Fix NoMethod error caused by nil users orbitalimpact#10
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbartonau committed Nov 17, 2018
1 parent de62541 commit 89c6801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hipmost/hipchat/room.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def private?
end

def users
if not attrs["members"].first.is_a? Integer
if not attrs["members"].first.nil? and not attrs["members"].first.is_a? Integer
@users ||= [ Hipchat.users[attrs["members"].first["id"]] ]
else
@users ||= attrs["members"].map{|uid| Hipchat.users[uid] }
Expand Down

0 comments on commit 89c6801

Please sign in to comment.