Skip to content

Commit d9388ca

Browse files
committed
fix slot fallback not empty
1 parent 6931a0c commit d9388ca

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compiler/compile/render_dom/Block.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,8 @@ export default class Block {
411411
return body;
412412
}
413413

414-
has_content() {
415-
return this.renderer.options.dev ||
414+
has_content(ignore_dev?: boolean) {
415+
return (!ignore_dev && this.renderer.options.dev) ||
416416
this.first ||
417417
this.event_listeners.length > 0 ||
418418
this.chunks.intro.length > 0 ||

src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default class InlineComponentWrapper extends Wrapper {
154154

155155
// removing empty slot
156156
for (const slot of this.slots.keys()) {
157-
if (!this.slots.get(slot).block.has_content()) {
157+
if (!this.slots.get(slot).block.has_content(true)) {
158158
this.slots.delete(slot);
159159
}
160160
}

0 commit comments

Comments
 (0)