mirror of https://github.com/sveltejs/svelte
fix: don't hang `migrate` on a declaration that shares a line with its script tag (#18816)
`migrate()` never returned when a declaration shared a line with its `<script>` tag: ```svelte <script>export let answer</script> ``` The scan that removes a migrated `export let` line looked for a newline in both directions with no bound. It now stops at the script's edges.main
parent
688a4e49b8
commit
8ef693e94e
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: don't hang `migrate` on a declaration that shares a line with its script tag
|
||||
@ -0,0 +1,2 @@
|
||||
<script>export let answer</script>
|
||||
<p>{answer}</p>
|
||||
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
let { answer } = $props();</script>
|
||||
<p>{answer}</p>
|
||||
Loading…
Reference in new issue