Skip to content

Commit 47a6687

Browse files
committed
more
1 parent b155600 commit 47a6687

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ export function SvelteBoundary(node, context) {
9595

9696
const block = /** @type {BlockStatement} */ (context.visit({ ...node.fragment, nodes }));
9797

98-
block.body.unshift(...const_tags);
98+
if (!node.fragment.metadata.has_await) {
99+
block.body.unshift(...const_tags);
100+
} else {
101+
block.body.splice(1, 0, ...const_tags);
102+
}
99103

100104
const boundary = b.stmt(
101105
b.call(

0 commit comments

Comments
 (0)