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>fix-15339
parent
2339a739ec
commit
16ea0cee92
@ -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