From a27c53e9133a946c64e0d59837e9f20c7b60bc2f Mon Sep 17 00:00:00 2001 From: theycallhermax Date: Sat, 20 Apr 2024 18:23:08 -0400 Subject: [PATCH] use `while` in `fetchData` function --- src/libpoketube/libpoketube-core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 353116a3..1fb0287a 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -81,7 +81,7 @@ class InnerTubePokeVidious { */ const response = await fetch(url, { headers }); - if (response.status === 500) { + while (response.status === 500) { // If status is 500, fetch again console.log("Retrying due to status 500..."); return fetchData(url, headers);