Browse code

FIX: pristup k neinicializovanemu objektu

Cinan Rakosnik authored on 06/05/2013 at 16:00:43
Showing 1 changed files
... ...
@@ -21,7 +21,7 @@ class WsController < WebsocketRails::BaseController
21 21
 
22 22
     def where_i_am_multichat_owner
23 23
         chats_owner = {}
24
-        connection_store[:clients] && connection_store[:clients].each do |client|
24
+        connection_store[:clients].is_a? Array && connection_store[:clients].each do |client|
25 25
             connection_store[:opened_chats][client].each do |chat_id, contacts|
26 26
                 if contacts[:owner] == client.jid.strip.to_s
27 27
                     chats_owner[client] = chat_id