1
0
Fork 0
mirror of https://codeberg.org/ashley/poke.git synced 2024-11-17 11:34:39 -05:00

try catch to video as well ig

This commit is contained in:
Ashley 2023-01-24 09:10:06 +00:00
parent ed7e07d341
commit 747b2b2a57

View file

@ -78,11 +78,16 @@ async function video(v) {
} catch {
var comments = "";
}
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
res.text()
try {
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then(
(res) => res.text()
);
var vid = await getJson(video_new_info);
} catch {
var vid = "";
}
if (checkUnexistingObject(vid)) {
var a;