diff --git a/internal/check-batch-selection-export.mjs b/internal/check-batch-selection-export.mjs index e03860a89..ab675773f 100644 --- a/internal/check-batch-selection-export.mjs +++ b/internal/check-batch-selection-export.mjs @@ -153,6 +153,13 @@ const wired = { // In batch mode a tap on a pin opens NO detail sheet (it covered the whole HUD on a phone); the tapestry // listener under it toggles the territory. The real-tap proof is rega's; this pins the guard in the source. 'a pin tap in batch mode opens no sheet': /map\.on\('click', 'upg-pins-hit', \(e\) => \{[\s\S]{0,700}?if \(batchMode\.value\) return\s*\n\s*const f = e && e\.features/.test(vue), + // …and that tap toggles the territory EXACTLY ONCE: the tapestry listener already does it, so the pin handler + // must not toggle a second time (select-then-deselect in one tap). + 'the pin handler adds no second toggle': (() => { + const at = vue.indexOf("map.on('click', 'upg-pins-hit', (e) => {"); if (at < 0) return false + const body = vue.slice(at, vue.indexOf('\n })', at)) + return !/toggleTerritory|toggleByProps|toggleZoneSelection/.test(body) + })(), 'the regroup warning on Copy': /const warn = regroupable\(sel\) \? '' : t\('upgMap\.copyNotRegroupable'\)/.test(vue), 'India states detected from the served table': /import \{ loadIndiaStates \} from '@map\/data\/indiaStates\.js'/.test(vue) && /india\.byShapeName\.get\(t\.name\)/.test(vue) && /t\.kind === 'adm1'\) indiaStates\(\)\.catch/.test(vue),