File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,10 @@ function propagate_error(error, effect) {
262
262
*/
263
263
function handle_error ( error , effect , component_context ) {
264
264
if ( handled_errors . has ( error ) ) {
265
+ // If the parent is not an error boundary then re-throw the error
266
+ if ( effect . parent === null || ( effect . parent . f & BOUNDARY_EFFECT ) === 0 ) {
267
+ throw error ;
268
+ }
265
269
return ;
266
270
}
267
271
handled_errors . add ( error ) ;
@@ -481,13 +485,6 @@ export function update_effect(effect) {
481
485
}
482
486
} catch ( error ) {
483
487
handle_error ( /** @type {Error } */ ( error ) , effect , previous_component_context ) ;
484
-
485
- if (
486
- ( flags & ROOT_EFFECT ) !== 0 ||
487
- ( effect . parent !== null && ( effect . parent . f & BOUNDARY_EFFECT ) === 0 )
488
- ) {
489
- throw error ;
490
- }
491
488
} finally {
492
489
active_effect = previous_effect ;
493
490
You can’t perform that action at this time.
0 commit comments