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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user