sponsorOf: a numeric sponsor ref (a member id, e.g. '1') now resolves; the bare byMemberId name threw inside a try and returned null, so members sponsored as #N had no sponsor for chat, coach and line checks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -501,7 +501,7 @@ async function sponsorOf(email) {
|
||||
let s = null;
|
||||
try { s = await byCode(ref); } catch (e) {}
|
||||
if (!s) { try { s = await byUsername(ref); } catch (e) {} }
|
||||
if (!s && /^\d+$/.test(ref)) { try { s = await byMemberId(Number(ref)); } catch (e) {} }
|
||||
if (!s && /^\d+$/.test(ref)) { try { s = await impl().byMemberId(Number(ref)); } catch (e) {} } // a numeric ref is a member id; byMemberId exists only on the exports object, so the bare name threw and was swallowed (2026-11-17)
|
||||
return s || null;
|
||||
}
|
||||
// is `memberEmail` anywhere in `sponsorEmail`'s downline (to `depth` levels)?
|
||||
|
||||
Reference in New Issue
Block a user