mirror of https://github.com/sveltejs/svelte
Compiler does sync then async but `memoizer.apply` did it the other way aroundpull/16655/head
parent
a60995abef
commit
6029951d02
@ -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