From c0d62c41c86e1fde6bf9db902d3ae226c8a1bc82 Mon Sep 17 00:00:00 2001 From: "S. Elliott Johnson" Date: Tue, 26 Dec 2023 23:42:03 -0500 Subject: [PATCH] chore: see if this fixes repl --- .../phases/3-transform/client/visitors/template.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js b/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js index 49fa8ed47e..cdefefeda2 100644 --- a/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js +++ b/packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js @@ -2474,22 +2474,11 @@ export const template_visitors = { declarations.push( b.let(argument.argument.name, b.call('$.proxy_rest_array', b.id(arg_alias))) ); - - // we need to eagerly evaluate the expression in order to hit any - // 'Cannot access x before initialization' errors - if (context.state.options.dev) { - declarations.push(b.stmt(b.call(argument.argument.name))); - } return; } const new_arg_alias = `$$proxied_arg${i}`; declarations.push(b.let(new_arg_alias, b.call('$.proxy_rest_array', b.id(arg_alias)))); - // we need to eagerly evaluate the expression in order to hit any - // 'Cannot access x before initialization' errors - if (context.state.options.dev) { - declarations.push(b.stmt(b.call(new_arg_alias))); - } arg_alias = new_arg_alias; } else { args.push(b.id(arg_alias));