Skip to content

fix: keep empty {:catch} in {#await} blocks - #553

Open
stickerdaniel wants to merge 1 commit into
sveltejs:mainfrom
stickerdaniel:fix/keep-empty-await-catch
Open

stickerdaniel wants to merge 1 commit into
sveltejs:mainfrom
stickerdaniel:fix/keep-empty-await-catch

Conversation

@stickerdaniel

@stickerdaniel stickerdaniel commented Oct 25, 2026 •

Copy link
Copy Markdown

Closes #552

An empty {:catch} was treated like a missing one and removed. Without a catch branch Svelte rethrows the rejection, so formatting turned a handled rejection into an unhandled one.

hasCatchBlock now checks whether the branch exists instead of whether it has content. Empty pending and {:then} branches are still collapsed as before.

Implemented with Claude Opus 5.5 (xhigh) and reviewed with GPT-6 Astra (xhigh) in Claude Code via T3 Code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Formatting removes an empty {:catch}, which changes runtime behavior

1 participant