Adding on error for socket to try to handle disconnect

This commit is contained in:
Kasper Rynning-Tønnesen
2015-07-08 01:12:47 +02:00
parent 21a1788d07
commit a60789ca2f
3 changed files with 13 additions and 2 deletions

View File

@@ -36,6 +36,7 @@ var Search = {
url: yt_url,
dataType:"jsonp",
success: function(response){
console.log(response.items.length);
if(response.items){
//get list of IDs and make new request for video info
$.each(response.items, function(i,data)