mirror of https://github.com/sveltejs/svelte
fix: skip static optimisation for stateless deriveds after await (#17389)
parent
acd752524b
commit
31ac74fac7
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: skip static optimisation for stateless deriveds after `await`
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
import { tick } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
async test({ assert, target }) {
|
||||||
|
await tick();
|
||||||
|
assert.htmlEqual(target.innerHTML, `<p>hello</p>`);
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
await 0;
|
||||||
|
let message = $derived('hello');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<p>{message}</p>
|
||||||
Loading…
Reference in new issue