mirror of https://github.com/sveltejs/svelte
We didn't set this back to `false`, which can lead to wrong results if the parent happened to have it set to `true` Fixes #17730pull/17944/head
parent
98e8b635fa
commit
89d8db25df
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: ensure "is standalone child" is correctly reset
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { src } = $props();
|
||||
</script>
|
||||
|
||||
<img {src} />
|
||||
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
let { children } = $props();
|
||||
</script>
|
||||
|
||||
<a href="/">
|
||||
{@render children()}
|
||||
</a>
|
||||
@ -0,0 +1,14 @@
|
||||
import { tick } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
mode: ['hydrate'],
|
||||
|
||||
async test({ assert, target }) {
|
||||
await tick();
|
||||
assert.htmlEqual(
|
||||
target.innerHTML,
|
||||
`<a href="/"><div>card</div> <img src="https://svelte.dev" /></a>`
|
||||
);
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,11 @@
|
||||
<script lang="ts">
|
||||
import Image from "./Image.svelte";
|
||||
import Link from "./Link.svelte";
|
||||
|
||||
let url = $derived(await 'https://svelte.dev');
|
||||
</script>
|
||||
|
||||
<Link>
|
||||
<div>card</div>
|
||||
<Image src={url} />
|
||||
</Link>
|
||||
Loading…
Reference in new issue