mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
hopefully logging out on mongojs error
This commit is contained in:
@@ -170,8 +170,9 @@ io.on('connection', function(socket){
|
||||
|
||||
db.collection(coll).find({now_playing:true}, function(err, np){
|
||||
//console.log(docs);
|
||||
if(err !== null) console.log(err);
|
||||
//console.log(docs.length);
|
||||
if(np !== null && np.length == 1 && np[0]["id"] == id){
|
||||
if(np !== null && np !== undefined && np.length == 1 && np[0]["id"] == id){
|
||||
db.collection(coll).find({views:{$exists:true}}, function(err, docs){
|
||||
var startTime = docs[0]["startTime"];
|
||||
if(docs[0]["removeplay"] == true)
|
||||
|
||||
Reference in New Issue
Block a user