From 5c84a2cbf8fa3a3f19e860fb7b057313668f5562 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 5 Apr 2024 15:03:44 +0200 Subject: [PATCH] fix getMessages getting called multiple times in parallel --- tubearchivist/static/progress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tubearchivist/static/progress.js b/tubearchivist/static/progress.js index a73654ab..3127214e 100644 --- a/tubearchivist/static/progress.js +++ b/tubearchivist/static/progress.js @@ -12,7 +12,7 @@ checkMessages(); // start to look for messages function checkMessages() { let notifications = document.getElementById('notifications'); - if (notifications) { + if (notifications && notifications.childNodes.length === 0 ) { let dataOrigin = notifications.getAttribute('data'); getMessages(dataOrigin); }