mirror of https://github.com/sveltejs/svelte
fix: allow `$props.id()` to occur after an `await` (#17285)
parent
f8287b0d91
commit
0e1c98ea11
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: allow `$props.id()` to occur after an `await`
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
import { tick } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
ssrHtml: `<p>s1</p>`,
|
||||||
|
|
||||||
|
async test({ assert, target, variant }) {
|
||||||
|
await tick();
|
||||||
|
assert.htmlEqual(target.innerHTML, variant === 'hydrate' ? '<p>s1</p>' : '<p>c1</p>');
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
await 1
|
||||||
|
const id = $props.id();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<p>{id}</p>
|
||||||
Loading…
Reference in new issue