From c72e20e99fbda774c5b8d2e220d508e31ea9f031 Mon Sep 17 00:00:00 2001 From: Stephan Yelle Date: Wed, 17 Dec 2025 20:12:42 -0500 Subject: [PATCH] Update samy.js --- samy.js | 8 ++++++++ 1 file changed, 8 insertions(+) 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) => {