fixed web panel internet connection status bug
This commit is contained in:
parent
0e4e798dcf
commit
f6d1c18ca3
@ -8629,13 +8629,11 @@
|
||||
|
||||
try {
|
||||
|
||||
const online = await fetch("https://ssl.gstatic.com/");
|
||||
const online = await fetch("http://api.openweathermap.org/data");
|
||||
|
||||
console.log(online.status);
|
||||
|
||||
|
||||
|
||||
if (online.status >= 200 && online.status < 300){
|
||||
if ((online.status >= 200 && online.status < 300) || online.status === 401) {
|
||||
|
||||
statusDisplay.text("Connected");
|
||||
|
||||
@ -8673,7 +8671,7 @@
|
||||
|
||||
}
|
||||
|
||||
}, 3000);
|
||||
}, 10000);
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user