Fixed issue with crashing server

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-19 23:48:11 +01:00
parent 910ad7ed76
commit 1da48a7f1a
2 changed files with 3 additions and 4 deletions

View File

@@ -627,7 +627,9 @@ function send_play(coll, socket, broadcast) {
}
function sendColor(coll, socket, id) {
coll = coll.replace(/ /g,'');
if(coll != undefined) {
coll = coll.replace(/ /g,'');
}
var url = 'https://img.youtube.com/vi/'+id+'/mqdefault.jpg';
Jimp.read(url).then(function (image) {

View File

@@ -80,9 +80,6 @@ function check_error_video(msg, channel) {
got: msg.hasOwnProperty("title") ? typeof(msg.title) : undefined,
},
};
if(socket) {
socket.emit("update_required", result);
}
return;
}
channel = channel.replace(/ /g,'');