mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 12:38:12 +01:00
add try and catch to about section
This commit is contained in:
parent
2c237a8334
commit
cdab6720ad
1 changed files with 9 additions and 2 deletions
|
@ -86,11 +86,18 @@ async function video(v) {
|
||||||
|
|
||||||
var vid = await getJson(video_new_info);
|
var vid = await getJson(video_new_info);
|
||||||
if (checkUnexistingObject(vid)) {
|
if (checkUnexistingObject(vid)) {
|
||||||
const a = await fetch(
|
|
||||||
|
var a;
|
||||||
|
|
||||||
|
try {
|
||||||
|
var a = await fetch(
|
||||||
`${config.tubeApi}channel?id=${vid.authorId}&tab=about`
|
`${config.tubeApi}channel?id=${vid.authorId}&tab=about`
|
||||||
)
|
)
|
||||||
.then((res) => res.text())
|
.then((res) => res.text())
|
||||||
.then((xml) => getJson(toJson(xml)));
|
.then((xml) => getJson(toJson(xml)));
|
||||||
|
} catch {
|
||||||
|
var a = ""
|
||||||
|
}
|
||||||
|
|
||||||
const summary = await wiki
|
const summary = await wiki
|
||||||
.summary(vid.author + " ")
|
.summary(vid.author + " ")
|
||||||
|
|
Loading…
Reference in a new issue