Преглед на файлове

simplified reload logic

Rodja Trappe преди 1 година
родител
ревизия
e7eba13af6
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      nicegui/templates/index.html

+ 2 - 2
nicegui/templates/index.html

@@ -232,8 +232,8 @@
           window.socket.on("disconnect", () => {
             document.getElementById('popup').style.opacity = 1;
             const checkAndReload = async () => {
-              const response = await fetch(window.location.href);
-              if (response.ok || response.status == 404) window.location.reload();
+              await fetch(window.location.href);
+              window.location.reload();
             };
             setInterval(checkAndReload, 500);
           });