From 41523a5cbf24346db5959685de4bdfca48a40819 Mon Sep 17 00:00:00 2001 From: Local Dev Date: Sat, 3 Oct 2026 23:28:58 +0200 Subject: [PATCH] Settings: a legacy "Middle East" location no longer kills the page Profiles from before the country picker carry locationMode "spoof" with a region; the Settings page migrates them to a country on load. middle_east mapped to AE, which was missing from COUNTRIES, so the destructure threw partway through the page script. Everything wired after that point never ran: the Ariadne panel stayed on "checking...", showed no collision policy, left Sources empty, and its on/off switch had no handler, so flipping it never asked for UAC and changed nothing. Add the United Arab Emirates (same Dubai coordinates main.js already uses for the region) and fall back to Germany for any region without a country, so a stale value can never stop the page again. --- settings.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/settings.html b/settings.html index 7489ec2f..7110051c 100644 --- a/settings.html +++ b/settings.html @@ -1579,6 +1579,7 @@ // country's capital (or biggest city) so pages that geocode the position // land in the right country. Alphabetised for the dropdown. const COUNTRIES = { + AE: ["United Arab Emirates", 25.2048, 55.2708], AR: ["Argentina", -34.6037, -58.3816], AT: ["Austria", 48.2082, 16.3738], AU: ["Australia", -33.8688, 151.2093], @@ -1658,7 +1659,10 @@ // has a valid value and the settings file is normalised on next save. const initialMode = (() => { if (s.locationMode === "spoof") { - const code = REGION_TO_COUNTRY[s.locationRegion] || "DE"; + // Every region must map to a COUNTRIES entry: this runs before the + // rest of the page is wired, so a throw here (middle_east -> AE, once + // missing from COUNTRIES) left Plug-ins and everything below it dead. + const code = COUNTRIES[REGION_TO_COUNTRY[s.locationRegion]] ? REGION_TO_COUNTRY[s.locationRegion] : "DE"; const [, la, lo] = COUNTRIES[code]; C.set("locationCountry", code); C.set("locationLat", String(la));