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 9905a6b commit d9db9e3Copy full SHA for d9db9e3
packages/svelte/src/compiler/phases/3-transform/client/visitors/ConstTag.js
@@ -17,7 +17,10 @@ export function ConstTag(node, context) {
17
// TODO we can almost certainly share some code with $derived(...)
18
if (declaration.id.type === 'Identifier') {
19
const init = build_expression(context, declaration.init, node.metadata.expression);
20
- let expression = create_derived(context.state, b.thunk(init, is_expression_async(init)));
+ let expression = create_derived(
21
+ context.state,
22
+ is_expression_async(init) ? b.arrow([], init, true) : b.thunk(init)
23
+ );
24
25
if (dev) {
26
expression = b.call('$.tag', expression, b.literal(declaration.id.name));
0 commit comments