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 <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user