Skip to content

Commit 741ba06

Browse files
committed
more
1 parent 2942e8b commit 741ba06

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/3-transform/client/visitors

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export function Fragment(node, context) {
4848
const is_single_child_not_needing_template =
4949
trimmed.length === 1 &&
5050
(trimmed[0].type === 'SvelteFragment' || trimmed[0].type === 'TitleElement');
51-
const has_await = context.state.init !== null && (node.metadata.has_await || false);
51+
const has_await = context.path.at(-1)?.type !== 'Root' && node.metadata.has_await;
5252

5353
const template_name = context.state.scope.root.unique('root'); // TODO infer name from parent
5454
const unsuspend = b.id('$$unsuspend');

0 commit comments

Comments
 (0)