Describe the bug
<script lang="ts">
async function getUser() {
return {
id: 1,
name: 'Rich'
};
}
const user = $derived(await getUser());
const { id, name } = $derived(user);
</script>
{id}-{name}
This results in error but deriving the object without destructuring works.
I think this issue is similar to #17224, which is supposed to be fixed by #17226. However, it doesn't fix this.
Reproduction
https://svelte.dev/playground/175e6f5e85a448f5a9f340fabbb89461?version=5.44.0
Logs
TypeError: Cannot read properties of undefined (reading 'f')
System Info
Severity
annoyance