Skip to content

Commit 9b01999

Browse files
idk man
1 parent e8153dc commit 9b01999

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

packages/svelte/src/compiler/phases/scope.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,8 @@ export function create_scopes(ast, root, allow_reactive_declarations, parent) {
592592
const child_scope = state.scope.child();
593593
scopes.set(node, child_scope);
594594

595-
if (node.context) {
596-
for (const id of extract_identifiers(node.context)) {
597-
child_scope.declare(id, 'each', 'let');
598-
}
595+
for (const id of extract_identifiers(node.context)) {
596+
child_scope.declare(id, 'each', 'let');
599597
}
600598

601599
context.next({ scope: child_scope });

packages/svelte/src/internal/client/render.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -2843,16 +2843,16 @@ export function sanitize_slots(props) {
28432843
/**
28442844
* @param {() => Function} get_snippet
28452845
* @param {Node} node
2846-
* @param {() => any} args
2846+
* @param {(() => any)[]} args
28472847
* @returns {void}
28482848
*/
2849-
export function snippet_effect(get_snippet, node, args) {
2849+
export function snippet_effect(get_snippet, node, ...args) {
28502850
const block = create_snippet_block();
28512851
render_effect(() => {
28522852
// Only rerender when the snippet function itself changes,
28532853
// not when an eagerly-read prop inside the snippet function changes
28542854
const snippet = get_snippet();
2855-
untrack(() => snippet(node, args));
2855+
untrack(() => snippet(node, ...args));
28562856
return () => {
28572857
if (block.d !== null) {
28582858
remove(block.d);

0 commit comments

Comments
 (0)