mirror of https://github.com/sveltejs/svelte
fix: ensure await scope shadowing is computed in the correct order (#12945)
* fix: ensure await scope shadowing is computed in the correct order * Create popular-news-happen.md * removed solopull/12940/head
parent
78677e40ef
commit
9c2ca693a5
@ -0,0 +1,5 @@
|
||||
---
|
||||
"svelte": patch
|
||||
---
|
||||
|
||||
fix: ensure `{#await}` scope shadowing is computed in the correct order
|
@ -0,0 +1,10 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: '<div>Loading...</div>',
|
||||
|
||||
async test({ assert, target }) {
|
||||
await Promise.resolve();
|
||||
assert.htmlEqual(target.innerHTML, '<div>10</div>');
|
||||
}
|
||||
});
|
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
const x = Promise.resolve(10);
|
||||
</script>
|
||||
|
||||
<div>
|
||||
{#await x}
|
||||
Loading...
|
||||
{:then x}
|
||||
{x}
|
||||
{/await}
|
||||
</div>
|
Loading…
Reference in new issue