Skip to content

Commit f5972d3

Browse files
committed
fix
1 parent 8091a6e commit f5972d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ export function VariableDeclaration(node, context) {
297297

298298
let call = b.call('$.derived', expression);
299299
if (dev) call = b.call('$.tag', call, b.literal(declarator.id.name));
300+
derived_declarators.push(b.declarator(declarator.id, call));
300301
}
301302
} else {
302303
const init = /** @type {CallExpression} */ (declarator.init);
@@ -329,6 +330,7 @@ export function VariableDeclaration(node, context) {
329330
const label = `[$derived ${declarator.id.type === 'ArrayPattern' ? 'iterable' : 'object'}]`;
330331
call = b.call('$.tag', call, b.literal(label));
331332
}
333+
derived_declarators.push(b.declarator(id, call));
332334
}
333335

334336
const { inserts, paths } = extract_paths(declarator.id, rhs);

0 commit comments

Comments
 (0)