@@ -30,7 +30,6 @@ import {
3030 enableSchedulingProfiler ,
3131 disableSchedulerTimeoutInWorkLoop ,
3232 enableStrictEffects ,
33- skipUnmountedBoundaries ,
3433 enableUpdaterTracking ,
3534 warnOnSubscriptionInsideStartTransition ,
3635 enableCache ,
@@ -2445,13 +2444,7 @@ export function captureCommitPhaseError(
24452444 return ;
24462445 }
24472446
2448- let fiber = null ;
2449- if ( skipUnmountedBoundaries ) {
2450- fiber = nearestMountedAncestor ;
2451- } else {
2452- fiber = sourceFiber . return ;
2453- }
2454-
2447+ let fiber = nearestMountedAncestor ;
24552448 while ( fiber !== null ) {
24562449 if ( fiber . tag === HostRoot ) {
24572450 captureCommitPhaseErrorOnRoot ( fiber , sourceFiber , error ) ;
@@ -2484,14 +2477,9 @@ export function captureCommitPhaseError(
24842477 }
24852478
24862479 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.
24922480 console . error (
24932481 '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 ' +
24952483 'causes include deleting the same fiber more than once, committing an ' +
24962484 'already-finished tree, or an inconsistent return pointer.\n\n' +
24972485 'Error message:\n\n%s' ,
0 commit comments