add try catch :p

This commit is contained in:
Ashley 2023-01-24 09:01:44 +00:00
parent 5e0e11f057
commit ed7e07d341

View file

@ -69,13 +69,15 @@ async function video(v) {
let nightlyRes;
var desc = "";
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then((res) =>
res.text()
try {
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then(
(res) => res.text()
);
var comments = await getJson(inv_comments);
} catch {
var comments = "";
}
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
res.text()
);