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