File tree Expand file tree Collapse file tree
react-devtools-shared/src/backend/fiber Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7898,7 +7898,7 @@ export function attach(
78987898 // Map of Fiber and its force error status: true (error), false (toggled off)
78997899 const forceErrorForFibers = new Map<Fiber, boolean>();
79007900
7901- function shouldErrorFiberAccordingToMap(fiber: any): boolean {
7901+ function shouldErrorFiberAccordingToMap(fiber: any): boolean | null {
79027902 if (typeof setErrorHandler !== 'function') {
79037903 throw new Error(
79047904 'Expected overrideError() to not get called for earlier React versions.',
@@ -7934,7 +7934,7 @@ export function attach(
79347934 }
79357935 }
79367936 if (status === undefined) {
7937- return false ;
7937+ return null ;
79387938 }
79397939 return status;
79407940 }
Original file line number Diff line number Diff line change @@ -1584,6 +1584,9 @@ function updateClassComponent(
15841584 // This is used by DevTools to force a boundary to error.
15851585 switch ( shouldError ( workInProgress ) ) {
15861586 case false : {
1587+ // We previously simulated an error on this boundary
1588+ // so the instance must have been constructed in a previous
1589+ // commit.
15871590 const instance = workInProgress . stateNode ;
15881591 const ctor = workInProgress . type ;
15891592 // TODO This way of resetting the error boundary state is a hack.
You can’t perform that action at this time.
0 commit comments