Skip to content

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

Merged
dummdidumm merged 1 commit into
sveltejs:mainfrom
stickerdaniel:fix/keep-empty-await-catch
Nov 17, 2026
Merged

dummdidumm merged 1 commit into
sveltejs:mainfrom
stickerdaniel:fix/keep-empty-await-catch

Conversation

@stickerdaniel

@stickerdaniel stickerdaniel commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

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.

@dummdidumm dummdidumm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@dummdidumm
dummdidumm merged commit 266091e into sveltejs:main Nov 17, 2026
5 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 17, 2026
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

2 participants