fix slot fallback not empty

pull/4501/head
Tan Li Hau 6 years ago
parent 6931a0c1cf
commit d9388caa03

@ -411,8 +411,8 @@ export default class Block {
return body; return body;
} }
has_content() { has_content(ignore_dev?: boolean) {
return this.renderer.options.dev || return (!ignore_dev && this.renderer.options.dev) ||
this.first || this.first ||
this.event_listeners.length > 0 || this.event_listeners.length > 0 ||
this.chunks.intro.length > 0 || this.chunks.intro.length > 0 ||

@ -154,7 +154,7 @@ export default class InlineComponentWrapper extends Wrapper {
// removing empty slot // removing empty slot
for (const slot of this.slots.keys()) { 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); this.slots.delete(slot);
} }
} }

Loading…
Cancel
Save