diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.js b/packages/react-reconciler/src/ReactFiberWorkLoop.js index 15a260bc660c..f0c75e089127 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.js @@ -1125,7 +1125,9 @@ export function performWorkOnRoot( forceSync: boolean, ): void { if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - throw new Error('Should not already be working.'); + // React Issue #17355: Prevent crash during breakpoints + console.error('Should not already be working.'); + return; } if (enableProfilerTimer && enableComponentPerformanceTrack) { @@ -3517,7 +3519,9 @@ function completeRoot( flushRenderPhaseStrictModeWarningsInDEV(); if ((executionContext & (RenderContext | CommitContext)) !== NoContext) { - throw new Error('Should not already be working.'); + // React Issue #17355: Prevent crash during breakpoints + console.error('Should not already be working.'); + return; } if (enableProfilerTimer && enableComponentPerformanceTrack) {