mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-22 16:37:52 +01:00
add try catch :p
This commit is contained in:
parent
71b57c615e
commit
c82b42dbe5
1 changed files with 8 additions and 6 deletions
|
@ -69,13 +69,15 @@ async function video(v) {
|
||||||
|
|
||||||
let nightlyRes;
|
let nightlyRes;
|
||||||
var desc = "";
|
var desc = "";
|
||||||
|
try {
|
||||||
|
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then(
|
||||||
|
(res) => res.text()
|
||||||
|
);
|
||||||
|
|
||||||
var inv_comments = await fetch(`${config.invapi}/comments/${v}`).then((res) =>
|
var comments = await getJson(inv_comments);
|
||||||
res.text()
|
} catch {
|
||||||
);
|
var comments = "";
|
||||||
|
}
|
||||||
var comments = await getJson(inv_comments);
|
|
||||||
|
|
||||||
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
|
var video_new_info = await fetch(`${config.invapi}/videos/${v}`).then((res) =>
|
||||||
res.text()
|
res.text()
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue