mirror of https://github.com/sveltejs/svelte
fix: exit resolved async blocks on correct node when hydrating (#17640)
* fix: exit resolved async blocks on correct node when hydrating * expand test + fix * tweak, add note to self --------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com> Co-authored-by: Simon Holthausen <simon.holthausen@vercel.com>pull/17644/head
parent
bc44975869
commit
6e5f2b157a
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: exit resolved async blocks on correct node when hydrating
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<script>
|
||||||
|
let { b } = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{b}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
import { tick } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
mode: ['hydrate'],
|
||||||
|
|
||||||
|
async test({ assert, target }) {
|
||||||
|
await tick();
|
||||||
|
assert.htmlEqual(target.innerHTML, `<div><p>hello</p></div> <div>true</div>`);
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Child from "./Child.svelte";
|
||||||
|
|
||||||
|
await 1;
|
||||||
|
let b = true;
|
||||||
|
let a = true;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if a}
|
||||||
|
<div>
|
||||||
|
{#if b}
|
||||||
|
<p>hello</p>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<Child {b} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
Loading…
Reference in new issue