fix(practice): prevent stray "0" rendering in problem area

Fix JSX gotcha where `problemHeight && <Component />` would render "0"
when problemHeight is 0. Changed to `(problemHeight ?? 0) > 0 &&` which
always evaluates to a boolean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-12-13 23:50:39 -06:00
parent 8851be5948
commit 7a2390bd1b

View File

@@ -1480,7 +1480,7 @@ export function ActiveSession({
)}
{/* Abacus dock - positioned absolutely so it doesn't affect problem centering */}
{/* Width 100% matches problem width, height matches problem height */}
{currentPart.type === 'abacus' && !showHelpOverlay && problemHeight && (
{currentPart.type === 'abacus' && !showHelpOverlay && (problemHeight ?? 0) > 0 && (
<AbacusDock
id="practice-abacus"
columns={String(Math.abs(attempt.problem.answer)).length}