From cdab6720ad7ce047dbf6f7a2559625b9908626be Mon Sep 17 00:00:00 2001 From: Ashley Date: Wed, 21 Dec 2022 15:38:26 +0000 Subject: [PATCH] add try and catch to about section --- src/libpoketube/libpoketube-core.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 99bf02eb..c419de51 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -86,12 +86,19 @@ async function video(v) { var vid = await getJson(video_new_info); if (checkUnexistingObject(vid)) { - const a = await fetch( + + var a; + + try { + var a = await fetch( `${config.tubeApi}channel?id=${vid.authorId}&tab=about` ) .then((res) => res.text()) .then((xml) => getJson(toJson(xml))); - + } catch { + var a = "" + } + const summary = await wiki .summary(vid.author + " ") .then((summary_) =>