summaryrefslogtreecommitdiffstats
path: root/assets/js/watch.js
diff options
context:
space:
mode:
authorAndrew Zhao <azhao12345@users.noreply.github.com>2021-01-10 17:05:08 -0500
committerAndrew Zhao <azhao12345@users.noreply.github.com>2021-01-10 17:05:08 -0500
commit5a08dfa72f26a250b09c643c47cd4abc18e3843c (patch)
tree5d76bd4e5e5fdd98d948a19db647aec86be3907a /assets/js/watch.js
parentc28b1f6fb9901aa033dccf5273392d30162953d7 (diff)
downloadinvidious-5a08dfa72f26a250b09c643c47cd4abc18e3843c.tar.gz
invidious-5a08dfa72f26a250b09c643c47cd4abc18e3843c.tar.bz2
invidious-5a08dfa72f26a250b09c643c47cd4abc18e3843c.zip
fix incorrect use of setinterval in js
Diffstat (limited to 'assets/js/watch.js')
-rw-r--r--assets/js/watch.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/assets/js/watch.js b/assets/js/watch.js
index 05530f3d..eb493bf3 100644
--- a/assets/js/watch.js
+++ b/assets/js/watch.js
@@ -272,7 +272,7 @@ function get_reddit_comments(retries) {
xhr.onerror = function () {
console.log('Pulling comments failed... ' + retries + '/5');
- setInterval(function () { get_reddit_comments(retries - 1) }, 1000);
+ setTimeout(function () { get_reddit_comments(retries - 1) }, 1000);
}
xhr.ontimeout = function () {
@@ -346,7 +346,7 @@ function get_youtube_comments(retries) {
comments.innerHTML =
'<h3 style="text-align:center"><div class="loading"><i class="icon ion-ios-refresh"></i></div></h3>';
console.log('Pulling comments failed... ' + retries + '/5');
- setInterval(function () { get_youtube_comments(retries - 1) }, 1000);
+ setTimeout(function () { get_youtube_comments(retries - 1) }, 1000);
}
xhr.ontimeout = function () {