diff --git a/src/libpoketube/libpoketube-dislikes.js b/src/libpoketube/libpoketube-dislikes.js index f65872cb..c2a728c1 100644 --- a/src/libpoketube/libpoketube-dislikes.js +++ b/src/libpoketube/libpoketube-dislikes.js @@ -46,18 +46,14 @@ async _getEngagementData() { const { fetch } = await import("undici"); - - try { - const engagement = await fetch(apiUrl).then((res) => res.json()); - return engagement; - } catch { - try { - const engagement = await fetch(fallbackUrl).then((res) => res.json()); + var engagementP = await fetch(apiUrl).then((res) => res.json()); + + if(!engagementP.dislikes) { + var engagement = await fetch(fallbackUrl).then((res) => res.json()); return engagement; - } catch { - return null; + } else { + return engagementP; } - } }