Skip to content

Commit 6cd4258

Browse files
committed
more?
1 parent 47a6687 commit 6cd4258

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ 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.path.at(-1)?.type !== 'Root' && node.metadata.has_await;
51+
const has_await =
52+
node.metadata.has_await && !(parent.type === 'Root' && parent.fragment === node);
5253

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

0 commit comments

Comments
 (0)