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));