Jelajahi Sumber

simplified reload logic

Rodja Trappe 1 tahun lalu
induk
melakukan
e7eba13af6
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  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);
           });