mirror of https://github.com/sveltejs/svelte
fix: handle renderer.run rejections (#17591)
* fix: handle renderer run rejections * add test * changeset * simplify * explanatory comment --------- Co-authored-by: Antonio Bennett <abennett@mabelslabels.com> Co-authored-by: Rich Harris <rich.harris@vercel.com>pull/17585/head
parent
704d0cd765
commit
5656dd569a
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: prevent unhandled exceptions arising from dangling promises in <script>
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
import { test } from '../../test';
|
||||||
|
|
||||||
|
export default test({
|
||||||
|
mode: ['async-server', 'hydrate'],
|
||||||
|
error: 'oops'
|
||||||
|
});
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
await 1;
|
||||||
|
|
||||||
|
throw new Error('oops');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<h1>hello</h1>
|
||||||
Loading…
Reference in new issue