mirror of https://github.com/sveltejs/svelte
fix: correctly handle bindings on the server (#18009)
`item.subsume(item)` did nothing, honestly kinda weird how this only turned up now Fixes #17981pull/18006/head
parent
957f2755fa
commit
04eadbc8a9
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: correctly handle bindings on the server
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
let data = $derived(await Promise.resolve('test'));
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div data-resolved={data ? 'true' : 'false'}>
|
||||||
|
{data}
|
||||||
|
</div>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
import Bound from './Bound.svelte';
|
||||||
|
|
||||||
|
let open;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Bound bind:open />
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
// Tests that renderer.subsume (which is used when bindings are present) works correctly
|
||||||
|
export default test({
|
||||||
|
mode: ['hydrate'],
|
||||||
|
html: '<div data-resolved="true">test</div>',
|
||||||
|
async test({ assert, warnings }) {
|
||||||
|
assert.deepEqual(warnings, []);
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Async from './Async.svelte';
|
||||||
|
import Binding from './Binding.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Async />
|
||||||
|
<Binding />
|
||||||
Loading…
Reference in new issue