Update list.js

This commit is contained in:
Kasper Rynning-Tønnesen
2019-05-03 15:12:25 +02:00
committed by GitHub
parent 4301c989f0
commit d7d1416c9c

View File

@@ -85,8 +85,8 @@ function list(msg, guid, coll, offline, socket) {
socket.join(coll);
Functions.check_inlist(coll, guid, socket, offline, undefined, "place 10");
if(frontpage_lists.viewers != undefined){
io.to(coll).emit("viewers", frontpage_lists.viewers);
if(frontpage_lists[0].viewers != undefined){
io.to(coll).emit("viewers", frontpage_lists[0].viewers);
} else {
io.to(coll).emit("viewers", 1);
}