Skip to content

Commit a791e91

Browse files
authored
fix: treat each blocks with async dependencies as uncontrolled (#17077)
1 parent 8ebc3b1 commit a791e91

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/fair-files-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'svelte': patch
3+
---
4+
5+
fix: treat each blocks with async dependencies as uncontrolled

packages/svelte/src/compiler/phases/3-transform/client/visitors/shared/fragment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export function process_children(nodes, initial, is_element, context) {
105105
is_element &&
106106
// In case it's wrapped in async the async logic will want to skip sibling nodes up until the end, hence we cannot make this controlled
107107
// TODO switch this around and instead optimize for elements with a single block child and not require extra comments (neither for async nor normally)
108-
!(node.body.metadata.has_await || node.metadata.expression.has_await)
108+
!(node.body.metadata.has_await || node.metadata.expression.is_async())
109109
) {
110110
node.metadata.is_controlled = true;
111111
} else {

0 commit comments

Comments
 (0)