More fixes in send_play function

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-09 14:24:49 +02:00
parent 44a04aa9fa
commit 3886875035

View File

@@ -635,8 +635,7 @@ function send_play(coll, socket)
db.collection(coll).find({now_playing:true}, function(err, np){
db.collection(coll).find({views:{$exists:true}}, function(err, conf){
if(err !== null) console.log(err);
if(conf === null) console.log(conf);
if(conf !== null && conf.length != 0)
if(conf !== null && conf !== undefined && conf.length != 0)
{
toSend = [np,conf,get_time()];
if(socket === undefined)