mirror of https://github.com/sveltejs/svelte
fix: detect mutations within assignments expressions (alternative approach) (#12429)
This enhances our "variable was mutated" detection to also recognize that `foo` in `[foo[1]] = [..]` was mutated. This allows us to be more granular about detecting mutations to each expressions in legacy mode, which fixes #12169 --------- Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>pull/12448/head
parent
efe3b39d09
commit
a8dc96eb43
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: detect mutations within assignment expressions
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
const { foo } = x();
|
||||
</script>
|
||||
|
||||
{#each foo as f}{/each}
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
const { foo } = x();
|
||||
</script>
|
||||
|
||||
{#each foo as f}{/each}
|
Loading…
Reference in new issue