mirror of https://github.com/sveltejs/svelte
fix: ensure correct order of template effect values (#16655)
Compiler does sync then async but `memoizer.apply` did it the other way aroundpull/16642/head
parent
11a2d8e937
commit
acd9eaf2ec
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: ensure correct order of template effect values
|
@ -0,0 +1,9 @@
|
|||||||
|
import { tick } from 'svelte';
|
||||||
|
import { ok, test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
async test({ assert, target }) {
|
||||||
|
await tick();
|
||||||
|
assert.htmlEqual(target.innerHTML, '<p>foo bar</p>');
|
||||||
|
}
|
||||||
|
});
|
@ -0,0 +1,17 @@
|
|||||||
|
<script>
|
||||||
|
function foo() {
|
||||||
|
return 'foo';
|
||||||
|
}
|
||||||
|
|
||||||
|
async function bar() {
|
||||||
|
return Promise.resolve('bar');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:boundary>
|
||||||
|
<p>{foo()} {await bar()}</p>
|
||||||
|
|
||||||
|
{#snippet pending()}
|
||||||
|
<p>pending</p>
|
||||||
|
{/snippet}
|
||||||
|
</svelte:boundary>
|
Loading…
Reference in new issue