We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47a6687 commit 6cd4258Copy full SHA for 6cd4258
packages/svelte/src/compiler/phases/3-transform/client/visitors/Fragment.js
@@ -48,7 +48,8 @@ export function Fragment(node, context) {
48
const is_single_child_not_needing_template =
49
trimmed.length === 1 &&
50
(trimmed[0].type === 'SvelteFragment' || trimmed[0].type === 'TitleElement');
51
- const has_await = context.path.at(-1)?.type !== 'Root' && node.metadata.has_await;
+ const has_await =
52
+ node.metadata.has_await && !(parent.type === 'Root' && parent.fragment === node);
53
54
const template_name = context.state.scope.root.unique('root'); // TODO infer name from parent
55
const unsuspend = b.id('$$unsuspend');
0 commit comments