Skip to content

Commit 3536a9f

Browse files
committed
fix
1 parent c9ee8df commit 3536a9f

File tree

1 file changed

+1
-1
lines changed
  • packages/svelte/src/compiler/phases/2-analyze/visitors/shared

1 file changed

+1
-1
lines changed

packages/svelte/src/compiler/phases/2-analyze/visitors/shared/function.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function visit_function(node, context) {
1717
for (const [name] of context.state.scope.references) {
1818
const binding = context.state.scope.get(name);
1919

20-
if (binding) {
20+
if (binding && binding.scope.function_depth < context.state.scope.function_depth) {
2121
context.state.expression.references.add(binding);
2222
}
2323
}

0 commit comments

Comments
 (0)