Add files via upload

master
Manas Khurana 2017-08-24 05:22:34 +05:30 committed by GitHub
parent 760b09276f
commit e3ca484d9b
1 changed files with 2 additions and 2 deletions

View File

@ -774,7 +774,7 @@ function queryName() {
try {
AJX("https://www.googleapis.com/youtube/v3/search?part=snippet&q=" + encodeURIComponent(rawInput) + "&type=channel&maxResults=1&key=" + getKey(), function(e) {
if(!e.items){
throw "undef e.items in queryName";
throw new Error( "undef e.items in queryName");
}
if(e.pageInfo.totalResults < 1) {//if no result found, show not found and hide stuff
document.getElementById('actualCount').style.display = "none";
@ -875,7 +875,7 @@ function live() {
AJX(url, function(e) {
var prevCount = actualCount;
if(!e.items || e.items[0].statistics.subscriberCount){
throw "undef e.items or e.items[0].statistics.subscriberCount in live";
throw new Error( "undef e.items or e.items[0].statistics.subscriberCount in live");
} else {
actualCount = e.items[0].statistics.subscriberCount;//set actualCount to realtime subscribers