diff --git a/packages/scheduler/npm/umd/scheduler.production.min.js b/packages/scheduler/npm/umd/scheduler.production.min.js index 4aa4caaea91c..2f706a0cccae 100644 --- a/packages/scheduler/npm/umd/scheduler.production.min.js +++ b/packages/scheduler/npm/umd/scheduler.production.min.js @@ -53,10 +53,18 @@ } function unstable_runWithPriority() { - return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply( - this, - arguments - ); + try { + return global.React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.Scheduler.unstable_runWithPriority.apply( + this, + arguments + ); + } catch (error) { + if (error.message === "Should not already be working") { + console.warn("Warning! Detected an issue with setState in componentDidMount when a breakpoint is set in Firefox. The error has been handled to prevent the application to crash"); + return; + } + throw error; + } } function unstable_next() {