diff --git a/src/compiler/compile/render_dom/wrappers/Slot.ts b/src/compiler/compile/render_dom/wrappers/Slot.ts
index 37b10c2ea3..f287198132 100644
--- a/src/compiler/compile/render_dom/wrappers/Slot.ts
+++ b/src/compiler/compile/render_dom/wrappers/Slot.ts
@@ -38,6 +38,7 @@ export default class SlotWrapper extends Wrapper {
name: this.renderer.component.get_unique_name(`fallback_block`),
type: 'fallback'
});
+ renderer.blocks.push(this.fallback);
}
this.fragment = new FragmentWrapper(
@@ -115,7 +116,6 @@ export default class SlotWrapper extends Wrapper {
if (this.fallback) {
this.fragment.render(this.fallback, null, x`#nodes` as Identifier);
- renderer.blocks.push(this.fallback);
}
const slot = block.get_unique_name(`${sanitize(slot_name)}_slot`);
diff --git a/test/runtime/samples/component-slot-fallback-3/Inner.svelte b/test/runtime/samples/component-slot-fallback-3/Inner.svelte
new file mode 100644
index 0000000000..db2af272d2
--- /dev/null
+++ b/test/runtime/samples/component-slot-fallback-3/Inner.svelte
@@ -0,0 +1,6 @@
+