Skip to content

Commit 110fef3

Browse files
committed
branches are identical
1 parent c43bfeb commit 110fef3

File tree

1 file changed

+4
-8
lines changed
  • packages/svelte/src/compiler/phases/3-transform/server/visitors

1 file changed

+4
-8
lines changed

packages/svelte/src/compiler/phases/3-transform/server/visitors/SnippetBlock.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,14 @@ export function SnippetBlock(node, context) {
2121
/** @type {BlockStatement} */ (context.visit(node.body))
2222
);
2323

24+
// @ts-expect-error - TODO remove this hack once $$render_inner for legacy bindings is gone
25+
fn.___snippet = true;
26+
2427
const push_to = node.metadata.can_hoist ? context.state.hoisted : context.state.init;
2528

2629
if (dev) {
2730
push_to.push(b.stmt(b.call('$.prevent_snippet_stringification', fn.id)));
2831
}
2932

30-
// @ts-expect-error - TODO remove this hack once $$render_inner for legacy bindings is gone
31-
fn.___snippet = true;
32-
33-
if (node.metadata.can_hoist) {
34-
push_to.push(fn);
35-
} else {
36-
push_to.push(fn);
37-
}
33+
push_to.push(fn);
3834
}

0 commit comments

Comments
 (0)