@@ -30,7 +30,6 @@ import {
30
30
enableSchedulingProfiler ,
31
31
disableSchedulerTimeoutInWorkLoop ,
32
32
enableStrictEffects ,
33
- skipUnmountedBoundaries ,
34
33
enableUpdaterTracking ,
35
34
warnOnSubscriptionInsideStartTransition ,
36
35
enableCache ,
@@ -2445,13 +2444,7 @@ export function captureCommitPhaseError(
2445
2444
return ;
2446
2445
}
2447
2446
2448
- let fiber = null ;
2449
- if ( skipUnmountedBoundaries ) {
2450
- fiber = nearestMountedAncestor ;
2451
- } else {
2452
- fiber = sourceFiber . return ;
2453
- }
2454
-
2447
+ let fiber = nearestMountedAncestor ;
2455
2448
while ( fiber !== null ) {
2456
2449
if ( fiber . tag === HostRoot ) {
2457
2450
captureCommitPhaseErrorOnRoot ( fiber , sourceFiber , error ) ;
@@ -2484,14 +2477,9 @@ export function captureCommitPhaseError(
2484
2477
}
2485
2478
2486
2479
if ( __DEV__ ) {
2487
- // TODO: Until we re-land skipUnmountedBoundaries (see #20147), this warning
2488
- // will fire for errors that are thrown by destroy functions inside deleted
2489
- // trees. What it should instead do is propagate the error to the parent of
2490
- // the deleted tree. In the meantime, do not add this warning to the
2491
- // allowlist; this is only for our internal use.
2492
2480
console . error (
2493
2481
'Internal React error: Attempted to capture a commit phase error ' +
2494
- 'inside a detached tree. This indicates a bug in React. Likely ' +
2482
+ 'inside a detached tree. This indicates a bug in React. Potential ' +
2495
2483
'causes include deleting the same fiber more than once, committing an ' +
2496
2484
'already-finished tree, or an inconsistent return pointer.\n\n' +
2497
2485
'Error message:\n\n%s' ,
0 commit comments