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
When using svelte:element with a custom element, setting a property to a null or undefined does not work. The setter on the custom element is simply not called. This is in contrast to the behavior when rendering the custom element directly using its registered tag name. In that case the element is updated as expected and the setter is called with null.
The REPL example shows the same custom element rendered twice. Once using svelte:element and once using its tag.
Clicking the button will rotate a name property between a string, null and undefined.
I would expect both of these to render the same, but the svelte:element version does not update whenever the value becomes null or undefined. As you can see in the console, its setter is never called.
Describe the bug
When using
svelte:element
with a custom element, setting a property to anull
orundefined
does not work. The setter on the custom element is simply not called. This is in contrast to the behavior when rendering the custom element directly using its registered tag name. In that case the element is updated as expected and the setter is called withnull
.The REPL example shows the same custom element rendered twice. Once using
svelte:element
and once using its tag.Clicking the button will rotate a
name
property between a string,null
andundefined
.I would expect both of these to render the same, but the
svelte:element
version does not update whenever the value becomesnull
orundefined
. As you can see in the console, its setter is never called.Reproduction
https://svelte.dev/repl/e38d35f309f64c19b4f1028fe43a0be1?version=3.49.0
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: