Bit of an edge case here...
If you have a <svelte:component> whose this doesn't have a value, and it has spread properties, then any updates will fail because the initial spread 'levels' have not been set. REPL
<button on:click="updateProps()">click me</button>
<svelte:component this={undefined} {...props}/>
{#if error}
<pre>{error.stack}</pre>
{/if}
<script>
export default {
data() {
return {
props: {}
};
},
methods: {
updateProps() {
try {
this.set({ props: {} });
} catch (error) {
this.set({ error });
}
}
}
};
</script>
Interestingly, the this.set({ error }) in that example also fails, because always Svelte tries to recalculate spread levels, even if nothing has changed. Should also get fixed.
Bit of an edge case here...
If you have a
<svelte:component>whosethisdoesn't have a value, and it has spread properties, then any updates will fail because the initial spread 'levels' have not been set. REPLInterestingly, the
this.set({ error })in that example also fails, because always Svelte tries to recalculate spread levels, even if nothing has changed. Should also get fixed.