From 606fa91b93d3ba386f0ca9779400fba462b3a57a Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 28 Nov 2025 21:10:03 +0000 Subject: [PATCH] fix: Party.svelte mainWeapon derived state (181 -> 177 errors) Co-Authored-By: Justin Edmund --- src/lib/components/party/Party.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/party/Party.svelte b/src/lib/components/party/Party.svelte index 3ef4d5ab..cfc38d75 100644 --- a/src/lib/components/party/Party.svelte +++ b/src/lib/components/party/Party.svelte @@ -221,11 +221,11 @@ }) // Derived elements for character image logic - const mainWeapon = $derived(() => + const mainWeapon = $derived( (party?.weapons ?? []).find((w) => w?.mainhand || w?.position === -1) ) - const mainWeaponElement = $derived(() => mainWeapon?.element ?? mainWeapon?.weapon?.element) - const partyElement = $derived(() => party?.element) + const mainWeaponElement = $derived(mainWeapon?.element ?? mainWeapon?.weapon?.element) + const partyElement = $derived((party as any)?.element) function handleTabChange(tab: GridType) { activeTab = tab