We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05d6658 commit 46cbdd4Copy full SHA for 46cbdd4
packages/svelte/src/compiler/phases/3-transform/client/visitors/template.js
@@ -2209,7 +2209,12 @@ export const template_visitors = {
2209
);
2210
2211
if (init.length !== 0 || update.length !== 0 || after_update.length !== 0) {
2212
- context.state.init.push(b.block([...init, serialize_render_stmt(update), ...after_update]));
+ const block = b.block([...init]);
2213
+ if (update.length > 0) {
2214
+ block.body.push(serialize_render_stmt(update));
2215
+ }
2216
+ block.body.push(...after_update);
2217
+ context.state.init.push(block);
2218
}
2219
2220
if (has_direction_attribute) {
0 commit comments