fix: add null guards for uncapLevel usage

- UncapIndicator.svelte: Use nullish coalescing for uncapLevel comparison
- UncapStatusDisplay.svelte: Guard uncapLevel in badge active checks

Fixes "'uncapLevel' is possibly 'null'" errors.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Justin Edmund 2025-11-28 18:05:39 -08:00
parent a748884faf
commit c750f5b069
2 changed files with 3 additions and 3 deletions

View file

@ -86,10 +86,10 @@
<span class="label">Available Upgrades</span>
<div class="uncap-badges">
{#if flb}
<span class="badge" class:active={uncapLevel >= 4}>FLB</span>
<span class="badge" class:active={(uncapLevel ?? 0) >= 4}>FLB</span>
{/if}
{#if ulb}
<span class="badge" class:active={uncapLevel >= 5}>ULB</span>
<span class="badge" class:active={(uncapLevel ?? 0) >= 5}>ULB</span>
{/if}
{#if transcendence}
<span class="badge" class:active={transcendenceStep > 0}>Trans</span>

View file

@ -91,7 +91,7 @@
return {
type: 'uncap',
props: {
empty: options.index >= uncapLevel,
empty: options.index >= (uncapLevel ?? 0),
index: options.index,
flb: options.flb,
ulb: options.ulb,