Skip to content

Commit

Permalink
fix slot fallback not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhauhau committed Mar 4, 2020
1 parent 6931a0c commit d9388ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/compiler/compile/render_dom/Block.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,8 @@ export default class Block {
return body;
}

has_content() {
return this.renderer.options.dev ||
has_content(ignore_dev?: boolean) {
return (!ignore_dev && this.renderer.options.dev) ||
this.first ||
this.event_listeners.length > 0 ||
this.chunks.intro.length > 0 ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class InlineComponentWrapper extends Wrapper {

// removing empty slot
for (const slot of this.slots.keys()) {
if (!this.slots.get(slot).block.has_content()) {
if (!this.slots.get(slot).block.has_content(true)) {
this.slots.delete(slot);
}
}
Expand Down

0 comments on commit d9388ca

Please sign in to comment.