fix: move lmcRankCell out of inner IIFE so it is in scope where used
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -334,6 +334,11 @@ function render(state) {
|
||||
const u = r.user || {}, name = fullName(u) || u.nickname || "Unknown";
|
||||
const uid = r.userId || r.user?.id;
|
||||
const eloMatch = findElo(name, uid);
|
||||
const lmcRankCell = (() => {
|
||||
if (!lmcLoaded) return `<td class="text-right font-mono text-base-content/40 hidden sm:table-cell"><span class="opacity-20">…</span></td>`;
|
||||
const rank = uid ? lmcRanks[uid] : undefined;
|
||||
return `<td class="text-right font-mono text-base-content/40 hidden sm:table-cell">${rank != null ? '#' + rank : '—'}</td>`;
|
||||
})();
|
||||
const tr = document.createElement("tr");
|
||||
tr.innerHTML =
|
||||
`<td class="font-mono text-base-content/60">${i === 0 ? `<strong class="text-base-content">1</strong>` : (i + 1)}</td>` +
|
||||
@@ -363,11 +368,6 @@ function render(state) {
|
||||
const pts = uid ? lmcPoints[uid] : undefined;
|
||||
return `<td class="text-right font-mono hidden sm:table-cell">${pts != null ? fmtPts(pts) : '<span class="text-base-content/40">—</span>'}</td>`;
|
||||
})();
|
||||
const lmcRankCell = (() => {
|
||||
if (!lmcLoaded) return `<td class="text-right font-mono text-base-content/40 hidden sm:table-cell"><span class="opacity-20">…</span></td>`;
|
||||
const rank = uid ? lmcRanks[uid] : undefined;
|
||||
return `<td class="text-right font-mono text-base-content/40 hidden sm:table-cell">${rank != null ? '#' + rank : '—'}</td>`;
|
||||
})();
|
||||
return `<td class="text-right font-mono font-bold">${fmtPts(r.ITCPoints)}` +
|
||||
mobilePct + mobileLmc + mobileElo + `</td>` +
|
||||
lmcCell +
|
||||
|
||||
Reference in New Issue
Block a user