Fix wrong-switch detection for nodes in locations with APs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ian Gulliver
2026-02-04 11:55:07 -08:00
parent 48e1e69fde
commit cd5f018e0c

View File

@@ -134,7 +134,7 @@ export function getSwitchesInLocation(loc, assignedNodes) {
if (isAP(n) && loc.isAPLocation) switches.push(n);
});
loc.children.forEach(child => {
if (child.anonymous || child.isAPLocation) {
if (child.anonymous && !child.isAPLocation) {
switches.push(...getSwitchesInLocation(child, assignedNodes));
}
});