Only pass error if it exists

This commit is contained in:
Ajay Ramachandran
2020-12-17 00:28:31 -05:00
parent 475c8c594a
commit 8cf3caa77e

View File

@@ -45,7 +45,7 @@ export class YouTubeAPI {
});
} else {
Logger.debug("redis: fetched video information from cache: " + videoID);
callback(getErr.message, JSON.parse(result));
callback(getErr?.message, JSON.parse(result));
}
});
};