Update samy.js
This commit is contained in:
8
samy.js
8
samy.js
@@ -240,6 +240,14 @@ async function fetchSites() {
|
||||
if (!resp.ok) throw "HTTP " + resp.status;
|
||||
|
||||
const sites = await resp.json();
|
||||
|
||||
if (!Array.isArray(sites) || sites.length === 0) {
|
||||
dropdown.innerHTML =
|
||||
'<option disabled selected>No sites returned</option>';
|
||||
alert("No Datto sites returned. Verify credentials/allowlist, or try again in a moment.");
|
||||
return;
|
||||
}
|
||||
|
||||
dropdown.innerHTML = "";
|
||||
|
||||
sites.forEach((site) => {
|
||||
|
||||
Reference in New Issue
Block a user