You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return`${validate_component(Foo,'Foo').$$render($$result,{},{},{default: ({ id })=>`${validate_component(Bar,'Bar').$$render($$result,{thing: things[id]},{},{})} `})}`
This fails with
TypeError: Cannot destructure property id of 'undefined' or 'null'.
Expected behavior
It might be nice if a warning was printed about the missing property. But the easy immediate fix is to always pass an object, i.e. $$slots.default({}). This way there's no disparity between <slot> and <slot someOtherProperty="whatever">.
Severity
Minor annoyance
The text was updated successfully, but these errors were encountered:
Describe the bug
A component with slotted contents will fail to render if it has a
let:
directive but the corresponding<slot>
has no properties.To Reproduce
This REPL demo contains the bug, though it's not directly visible since it's SSR-only. The offending code is this:
$$slots.default
corresponds to this:This fails with
Expected behavior
It might be nice if a warning was printed about the missing property. But the easy immediate fix is to always pass an object, i.e.
$$slots.default({})
. This way there's no disparity between<slot>
and<slot someOtherProperty="whatever">
.Severity
Minor annoyance
The text was updated successfully, but these errors were encountered: