11ty / webc

Single File Web Components
MIT License
1.3k stars 36 forks source link

`slots.text.default` sometimes referenced the wrong host component #165

Closed zachleat closed 1 year ago

zachleat commented 1 year ago

Example code.webc:

<script webc:type="js" webc:root webc:raw>
let txt = slots.text.default;
webc.escapeText(txt);
</script>

When used inside the default slot of another component: <my-component><code>Test</code></my-component> the slots.text.default value was wrong or empty.

zachleat commented 1 year ago

Related to #48