@@ -244,13 +244,11 @@ function propagate_error(error, effect) {
244
244
// @ts -ignore
245
245
current . fn ( { error } ) ;
246
246
} catch {
247
- set_signal_status ( current , DESTROYED ) ;
248
247
current = parent ;
249
248
continue ;
250
249
}
251
250
return ;
252
251
}
253
- set_signal_status ( current , DESTROYED ) ;
254
252
current = parent ;
255
253
}
256
254
@@ -263,8 +261,12 @@ function propagate_error(error, effect) {
263
261
* @param {ComponentContext | null } component_context
264
262
*/
265
263
function handle_error ( error , effect , component_context ) {
266
- // Given we don't yet have error boundaries, we will just always throw.
267
- if ( ! DEV || handled_errors . has ( error ) || component_context === null ) {
264
+ if ( handled_errors . has ( error ) ) {
265
+ return ;
266
+ }
267
+ handled_errors . add ( error ) ;
268
+
269
+ if ( ! DEV || component_context === null ) {
268
270
propagate_error ( error , effect ) ;
269
271
return ;
270
272
}
@@ -317,7 +319,6 @@ function handle_error(error, effect, component_context) {
317
319
} ) ;
318
320
}
319
321
320
- handled_errors . add ( error ) ;
321
322
propagate_error ( error , effect ) ;
322
323
}
323
324
@@ -479,14 +480,9 @@ export function update_effect(effect) {
479
480
dev_effect_stack . push ( effect ) ;
480
481
}
481
482
} catch ( error ) {
482
- if ( ( effect . f & DESTROYED ) === 0 ) {
483
- handle_error ( /** @type {Error } */ ( error ) , effect , previous_component_context ) ;
484
- }
483
+ handle_error ( /** @type {Error } */ ( error ) , effect , previous_component_context ) ;
485
484
486
- if (
487
- ( flags & ROOT_EFFECT ) !== 0 ||
488
- ( effect . parent !== null && ( effect . parent . f & BOUNDARY_EFFECT ) === 0 )
489
- ) {
485
+ if ( effect . parent !== null && ( effect . parent . f & BOUNDARY_EFFECT ) === 0 ) {
490
486
throw error ;
491
487
}
492
488
} finally {
0 commit comments