From cbc5a703f841867444011bf776e6849eddbb4359 Mon Sep 17 00:00:00 2001 From: julien Date: Thu, 19 Jun 2025 14:09:06 +0200 Subject: [PATCH] fix js --- templates/godownloader_download.pages.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/godownloader_download.pages.tmpl b/templates/godownloader_download.pages.tmpl index 4741c20..d2b31eb 100644 --- a/templates/godownloader_download.pages.tmpl +++ b/templates/godownloader_download.pages.tmpl @@ -65,7 +65,11 @@ - let es = new EventSource("/api/download/stream"); + if (typeof es === 'undefined') { + let es = new EventSource("/api/download/stream"); + } else { + es = new EventSource("/api/download/stream"); + } es.addEventListener("jobs", async (e) => { console.log("🧪 Event brut reçu es const:", e.data);