File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,18 @@ export function handle_error(error) {
2020 adjust_error ( error , effect ) ;
2121 }
2222
23- if ( ( effect . f & EFFECT_RAN ) !== 0 ) {
24- invoke_error_boundary ( error , effect ) ;
25- } else if ( ( effect . f & BOUNDARY_EFFECT ) !== 0 ) {
26- // invoke directly
23+ if ( ( effect . f & EFFECT_RAN ) === 0 ) {
24+ // if the error occurred while creating this subtree, we let it
25+ // bubble up until it hits a boundary that can handle it
26+ if ( ( effect . f & BOUNDARY_EFFECT ) === 0 ) {
27+ throw error ;
28+ }
29+
30+ // @ts -expect-error
2731 effect . fn ( error ) ;
2832 } else {
29- throw error ;
33+ // otherwise we bubble up the effect tree ourselves
34+ invoke_error_boundary ( error , effect ) ;
3035 }
3136}
3237
You can’t perform that action at this time.
0 commit comments