Skip to content

Commit 0c24129

Browse files
committed
tidy up
1 parent 94d74f2 commit 0c24129

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ export function SlotElement(node, context) {
6161
}
6262
}
6363

64+
[...async_expressions, ...expressions].forEach((memo, i) => {
65+
memo.id.name = `$${i}`;
66+
});
67+
6468
// Let bindings first, they can be used on attributes
6569
context.state.init.push(...lets);
6670

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ import { build_getter, create_derived } from '../../utils.js';
1616
* @param {Expression} expression
1717
*/
1818
export function get_expression_id(expressions, expression) {
19-
// TODO tidy this up
20-
const id = b.id(`$${expressions.length}`);
19+
const id = b.id(`#`); // filled in later
2120
expressions.push({ id, expression });
2221

2322
return id;

0 commit comments

Comments
 (0)