mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 18:29:03 +01:00
add try and catch to about section
This commit is contained in:
parent
cfb0176d21
commit
1f9f5aaf6f
1 changed files with 10 additions and 7 deletions
|
@ -111,13 +111,16 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
const ID = req.query.id;
|
const ID = req.query.id;
|
||||||
const tab = req.query.tab;
|
const tab = req.query.tab;
|
||||||
|
|
||||||
|
try {
|
||||||
// about
|
// about
|
||||||
const bout = await modules.fetch(
|
const bout = await modules.fetch(
|
||||||
config.tubeApi + `channel?id=${ID}&tab=about`
|
config.tubeApi + `channel?id=${ID}&tab=about`
|
||||||
);
|
);
|
||||||
const h = await bout.text();
|
const h = await bout.text();
|
||||||
const k = JSON.parse(modules.toJson(h));
|
var k = JSON.parse(modules.toJson(h));
|
||||||
|
} catch {
|
||||||
|
k = " ";
|
||||||
|
}
|
||||||
if (req.query.continuation) {
|
if (req.query.continuation) {
|
||||||
var continuation = req.query.continuation;
|
var continuation = req.query.continuation;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue