From 18d303abd9ffed352a76d67086124688bf86aa90 Mon Sep 17 00:00:00 2001 From: Ashley Date: Sun, 26 Mar 2023 12:31:06 +0000 Subject: [PATCH] add try and catch to about section owo :3 --- src/libpoketube/libpoketube-core.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index afa3b31c..937dc6be 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -122,11 +122,6 @@ async function video(v) { var a = ""; } - const summary = await wiki - .summary(vid.author + " ") - .then((summary_) => - summary_.title !== "Not found." ? summary_ : "none" - ); desc = a.Channel?.Contents?.ItemSection?.About?.Description; @@ -135,6 +130,13 @@ async function video(v) { const nightlyJsonData = getJson(nightlyRes); try { + + const summary = await wiki + .summary(vid.author + " ") + .then((summary_) => + summary_.title !== "Not found." ? summary_ : "none" + ); + const headers = {}; var { data } = await curly.get(`${config.tubeApi}video?v=${v}`, {