From b2182b7466a6a9a5d3035386de71bf0cd4363952 Mon Sep 17 00:00:00 2001 From: martbost Date: Thu, 19 Nov 2026 10:30:00 -0600 Subject: [PATCH] Org routing (leak) map: catcher test is level > levelIndex (at or above the level the buyer leaves), not levelIndex + 1; matches the contract and the rest of the site (Marty 2026-11-19) Co-Authored-By: Claude Opus 5.5 --- chain.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain.js b/chain.js index 1aaabc9..dec6a29 100644 --- a/chain.js +++ b/chain.js @@ -714,7 +714,7 @@ function getOrgRouting(rootId, ownerIds) { if (!up || up === CROOT) return null; const u = M[up]; if (!u) return null; if (i < li) { up = u.uplineId; continue; } - if ((u.level || 1) > li + 1 && (u.directCount || 0) >= 2) return up; + if ((u.level || 1) > li && (u.directCount || 0) >= 2) return up; // contract: level > levelIndex (at or above the level the buyer LEAVES); was li + 1 until 2026-11-19 up = u.uplineId; } return null;