diff --git a/src/lib/components/sidebar/details/TeamView.svelte b/src/lib/components/sidebar/details/TeamView.svelte index 5dcbcea8..bb5d25e5 100644 --- a/src/lib/components/sidebar/details/TeamView.svelte +++ b/src/lib/components/sidebar/details/TeamView.svelte @@ -88,7 +88,7 @@ {#each weapon.ax as axSkill} {/if} @@ -54,7 +54,7 @@ {#if variant === 'detailed'} - {formatRingStat(ring.modifier, ring.strength, locale).split('+')[0].trim()} + {formatRingStat(ring.modifier, ring.strength, locale).split('+')[0]?.trim() ?? ''} +{ring.strength}{getRingStat(ring.modifier)?.suffix || ''} @@ -81,7 +81,7 @@ {#if iconUrl} {formatEarringStat(earring.modifier, {/if} @@ -89,7 +89,7 @@ {#if variant === 'detailed'} - {formatEarringStat(earring.modifier, earring.strength, locale, characterElement).split('+')[0].trim()} + {formatEarringStat(earring.modifier, earring.strength, locale, characterElement).split('+')[0]?.trim() ?? ''} +{earring.strength}{getElementalizedEarringStat(earring.modifier, characterElement, locale)?.suffix || ''} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 2e5253e2..7b066550 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -58,10 +58,11 @@ // Handle scroll restoration or reset after navigation afterNavigate(({ from, to, type }) => { - if (!mainContent) return; + if (!mainContent || !to) return; // Use requestAnimationFrame to ensure DOM has updated requestAnimationFrame(() => { + if (!mainContent) return; const key = to.url.pathname + to.url.search; // Only restore scroll for browser back/forward navigation