mirror of https://github.com/sveltejs/svelte
commit
4116e9f25e
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'svelte': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: properly track effect end node for async sibling component
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'svelte': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: prevent false-positive reactivity loss warning
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'svelte': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
chore: bump esrap dependency
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'svelte': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: ignore declaration tags for animation directive
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
---
|
|
||||||
'svelte': patch
|
|
||||||
---
|
|
||||||
|
|
||||||
fix: reject pending async deriveds on discard
|
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
const data = $derived(await Promise.reject(new Error('oops')));
|
||||||
|
const model = $derived({ title: data.title });
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h4>{model.title}</h4>
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
import { tick } from 'svelte';
|
||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
async test({ assert, target }) {
|
||||||
|
const [button] = target.querySelectorAll('button');
|
||||||
|
|
||||||
|
button.click();
|
||||||
|
await tick();
|
||||||
|
|
||||||
|
assert.htmlEqual(target.innerHTML, '<button>show</button><p>error was contained</p>');
|
||||||
|
}
|
||||||
|
});
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
<script>
|
||||||
|
import Child from './Child.svelte';
|
||||||
|
|
||||||
|
let open = $state(false);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svelte:boundary>
|
||||||
|
<button onclick={() => (open = true)}>show</button>
|
||||||
|
|
||||||
|
{#if open}
|
||||||
|
<svelte:boundary>
|
||||||
|
<Child />
|
||||||
|
|
||||||
|
{#snippet pending()}
|
||||||
|
<p>loading…</p>
|
||||||
|
{/snippet}
|
||||||
|
|
||||||
|
{#snippet failed()}
|
||||||
|
<p>error was contained</p>
|
||||||
|
{/snippet}
|
||||||
|
</svelte:boundary>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
{#snippet failed()}
|
||||||
|
<p>error escaped containment</p>
|
||||||
|
{/snippet}
|
||||||
|
</svelte:boundary>
|
||||||
Loading…
Reference in new issue