From b4ad3324264f6efebba5f3648c1d9d98afd6f6f1 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Sat, 25 Oct 2025 21:15:28 -0400 Subject: [PATCH] revert --- .../svelte/src/compiler/phases/2-analyze/index.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/svelte/src/compiler/phases/2-analyze/index.js b/packages/svelte/src/compiler/phases/2-analyze/index.js index 51a1ed2171..c0acd0546c 100644 --- a/packages/svelte/src/compiler/phases/2-analyze/index.js +++ b/packages/svelte/src/compiler/phases/2-analyze/index.js @@ -131,16 +131,7 @@ const visitors = { ignore_map.set(node, structuredClone(ignore_stack)); const scope = state.scopes.get(node); - - if (scope !== undefined && scope !== state.scope) { - const child_state = { ...state }; - - if (scope !== undefined && scope !== state.scope) child_state.scope = scope; - - next(child_state); - } else { - next(); - } + next(scope !== undefined && scope !== state.scope ? { ...state, scope } : state); if (ignores.length > 0) { pop_ignore();