Skip to content

Commit 88e4fb6

Browse files
apply suggestion from review
Co-authored-by: Rich Harris <[email protected]>
1 parent 155e69c commit 88e4fb6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ export function AwaitExpression(node, context) {
1515
// preserve context for
1616
// a) top-level await and
1717
// b) awaits that precede other expressions in template or `$derived(...)`
18-
if (
19-
tla ||
20-
(is_reactive_expression(context) &&
21-
(!is_last_evaluated_expression(context, node) || context.path.at(-1)?.type === 'ConstTag'))
22-
) {
18+
if (tla || (is_reactive_expression(context) && !is_last_evaluated_expression(context, node))) {
2319
return b.call(b.await(b.call('$.save', argument)));
2420
}
2521

0 commit comments

Comments
 (0)