mirror of https://github.com/sveltejs/svelte
fix: Don't crash on `hydratable` serialization failures (#17315)
* fix: Don't crash on `hydratable` serialization failures * better * Update two-lizards-poke.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> --------- Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>pull/17329/head
parent
ad91827a23
commit
44058da346
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: don't crash on `hydratable` serialization failure
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
mode: ['async'],
|
||||||
|
error: 'hydratable_serialization_failed'
|
||||||
|
});
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { hydratable } from 'svelte';
|
||||||
|
|
||||||
|
hydratable('key', () => new Promise(() => { throw new Error('nope') }));
|
||||||
|
</script>
|
||||||
Loading…
Reference in new issue