receive default slot values in named slots

pull/2419/head
Richard Harris 6 years ago
parent ff01d64791
commit 45f28fbf30

@ -143,7 +143,14 @@ export default class ElementWrapper extends Wrapper {
name: this.renderer.component.get_unique_name(`create_${sanitize(name)}_slot`) name: this.renderer.component.get_unique_name(`create_${sanitize(name)}_slot`)
}); });
const fn = get_context_merger(this.node.lets); const lets = this.node.lets;
const seen = new Set(lets.map(l => l.name));
(owner as InlineComponentWrapper).node.lets.forEach(l => {
if (!seen.has(l.name)) lets.push(l);
});
const fn = get_context_merger(lets);
(owner as InlineComponentWrapper).slots.set(name, { (owner as InlineComponentWrapper).slots.set(name, {
block: child_block, block: child_block,

Loading…
Cancel
Save