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) {
262262 */
263263function handle_error ( error , effect , component_context ) {
264264 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+ }
265269 return ;
266270 }
267271 handled_errors . add ( error ) ;
@@ -481,13 +485,6 @@ export function update_effect(effect) {
481485 }
482486 } catch ( error ) {
483487 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- }
491488 } finally {
492489 active_effect = previous_effect ;
493490
You can’t perform that action at this time.
0 commit comments