You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an error occurs inside #if block within an <svelte:boundary>, there is a bug where the remaining elements are not removed and remain visible.
This issue doesn't occur in the development environment but only happens in the production build. (NODE_ENV=production)
<svelte:boundary>
<div>This should be removed</div>
{#iftrue}
<ErrorComponent /> <!-- This throws an error -->
{/if}
{#snippetfailed()}
<div>error boundary</div>
{/snippet}
</svelte:boundary>
zeroberry
changed the title
Content persists in <svelte:boundary> when error occurs in #if block (on production only)
BUG: <svelte:boundary> not working when error occurs inside #if block (only in production build)
Apr 11, 2025
Describe the bug
When an error occurs inside
#if
block within an<svelte:boundary>
, there is a bug where the remaining elements are not removed and remain visible.This issue doesn't occur in the development environment but only happens in the production build. (
NODE_ENV=production
)Reproduction
https://stackblitz.com/edit/vitejs-vite-zvok4jqx?file=src%2FApp.svelte
You can reproduce this issue by running:
NODE_ENV=production npm run dev
ornpm run build && npm run preview
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: