mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Trying small fix for null-viewers bug
This commit is contained in:
@@ -41,7 +41,11 @@ var list = function(msg, guid, coll, offline, socket) {
|
||||
socket.join(coll);
|
||||
Functions.check_inlist(coll, guid, socket, offline);
|
||||
|
||||
io.to(coll).emit("viewers", frontpage_lists.viewers);
|
||||
if(frontpage_lists.viewers != undefined){
|
||||
io.to(coll).emit("viewers", frontpage_lists.viewers);
|
||||
} else {
|
||||
io.to(coll).emit("viewers", 1);
|
||||
}
|
||||
|
||||
send_list(coll, socket, true, false, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user