From 07812119b91d7239a8b64f43d2ba3cab8b1076ac Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 12 Feb 2024 23:08:21 -0500 Subject: [PATCH] tidy --- .../phases/3-transform/client/visitors/template.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 637d9131ba..237acab545 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 @@ -1006,9 +1006,11 @@ function serialize_inline_component(node, component_name, context) { ); } - const statements = [...snippet_declarations, ...binding_initializers]; - - statements.push(b.stmt(fn(context.state.node))); + const statements = [ + ...snippet_declarations, + ...binding_initializers, + b.stmt(fn(context.state.node)) + ]; return statements.length > 1 ? b.block(statements) : statements[0]; }