mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-13 03:18:07 +01:00
try catch to video as well ig
This commit is contained in:
parent
c82b42dbe5
commit
be0e30ed4f
1 changed files with 9 additions and 4 deletions
|
@ -78,11 +78,16 @@ async function video(v) {
|
||||||
} catch {
|
} catch {
|
||||||
var comments = "";
|
var comments = "";
|
||||||
}
|
}
|
||||||
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
|
try {
|
||||||
res.text()
|
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then(
|
||||||
);
|
(res) => res.text()
|
||||||
|
);
|
||||||
|
|
||||||
|
var vid = await getJson(video_new_info);
|
||||||
|
} catch {
|
||||||
|
var vid = "";
|
||||||
|
}
|
||||||
|
|
||||||
var vid = await getJson(video_new_info);
|
|
||||||
if (checkUnexistingObject(vid)) {
|
if (checkUnexistingObject(vid)) {
|
||||||
var a;
|
var a;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue