Made getChannelID only get called if there is a valid YouTube page.

This commit is contained in:
Ajay Ramachandran 2019-09-02 10:54:49 -04:00
parent f310c53f88
commit 7deea5d648

View file

@ -240,12 +240,12 @@ function videoIDChange(id) {
resetValues();
let channelIDPromise = wait(getChannelID);
channelIDPromise.then(() => channelIDPromise.isFulfilled = true).catch(() => channelIDPromise.isRejected = true)
//id is not valid
if (!id) return;
let channelIDPromise = wait(getChannelID);
channelIDPromise.then(() => channelIDPromise.isFulfilled = true).catch(() => channelIDPromise.isRejected = true);
//setup the preview bar
if (previewBar == null) {
//create it