mirror of https://github.com/sveltejs/svelte
fix: check references for blockers on server, too (#18352)
We forgot the server in #18309 Fixes #18344pull/18346/head
parent
2afb895ffa
commit
56013a2c01
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: check references for blockers on server, too
|
||||
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
let { onclick } = $props();
|
||||
</script>
|
||||
|
||||
<button {onclick}>A button</button>
|
||||
@ -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, 'foo <button>A button</button>');
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,12 @@
|
||||
<script>
|
||||
import Button from './Child.svelte';
|
||||
|
||||
async function getFoo() {
|
||||
return 'foo';
|
||||
}
|
||||
|
||||
const foo = $derived(await getFoo());
|
||||
</script>
|
||||
|
||||
{foo}
|
||||
<Button onclick={() => foo} />
|
||||
Loading…
Reference in new issue