File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -258,19 +258,21 @@ export function check_dirtiness(reaction) {
258258 * @param {Effect } effect
259259 */
260260function propagate_error ( error , effect ) {
261- var boundary = effect . b ;
261+ /** @type {Effect | null } */
262+ var current = effect ;
262263
263- while ( boundary !== null ) {
264- if ( ! boundary . inert ) {
264+ while ( current !== null ) {
265+ if ( ( current . f & BOUNDARY_EFFECT ) !== 0 ) {
265266 try {
266- boundary . error ( error ) ;
267+ /** @type { Boundary } */ ( current . b ) . error ( error ) ;
267268 return ;
268269 } catch {
269- boundary . inert = true ;
270+ // Remove boundary flag from effect
271+ current . f ^= BOUNDARY_EFFECT ;
270272 }
271273 }
272274
273- boundary = boundary . parent ;
275+ current = current . parent ;
274276 }
275277
276278 is_throwing_error = false ;
@@ -281,7 +283,10 @@ function propagate_error(error, effect) {
281283 * @param {Effect } effect
282284 */
283285function should_rethrow_error ( effect ) {
284- return ( effect . f & DESTROYED ) === 0 && ( effect . parent === null || ! effect . b || effect . b . inert ) ;
286+ return (
287+ ( effect . f & DESTROYED ) === 0 &&
288+ ( effect . parent === null || ( effect . parent . f & BOUNDARY_EFFECT ) === 0 )
289+ ) ;
285290}
286291
287292export function reset_is_throwing_error ( ) {
You can’t perform that action at this time.
0 commit comments