diff --git a/samy.js b/samy.js index cfe82cc..c214036 100644 --- a/samy.js +++ b/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 = + ''; + alert("No Datto sites returned. Verify credentials/allowlist, or try again in a moment."); + return; + } + dropdown.innerHTML = ""; sites.forEach((site) => {