mirror of https://github.com/sveltejs/svelte
parent
24ed44c10f
commit
956e81bf5b
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure async static props/attributes are awaited
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { value } = $props();
|
||||
</script>
|
||||
|
||||
{value}
|
||||
@ -0,0 +1,11 @@
|
||||
import { tick } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
mode: ['async-server', 'client', 'hydrate'],
|
||||
ssrHtml: 'value <div class="value"></div>',
|
||||
async test({ assert, target }) {
|
||||
await tick();
|
||||
assert.htmlEqual(target.innerHTML, 'value <div class="value"></div>');
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import Child from './Child.svelte';
|
||||
|
||||
await 1;
|
||||
|
||||
let value = 'value';
|
||||
</script>
|
||||
|
||||
<Child {value} />
|
||||
<div class={value}></div>
|
||||
Loading…
Reference in new issue