From e0af1aabec3d3ee24f57aaaf9407860463f20213 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Wed, 9 Feb 2022 20:49:35 -0500 Subject: [PATCH] Fix wrong context argument to `apply` The context argument should be the array, not null. I wrote a test that I'll include in the next PR. --- packages/react-reconciler/src/ReactFiberWorkLoop.new.js | 2 +- packages/react-reconciler/src/ReactFiberWorkLoop.old.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js index f3efac3e74d68..ece137e8477e5 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.new.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.new.js @@ -925,7 +925,7 @@ export function queueRecoverableErrors(errors: Array) { workInProgressRootRecoverableErrors = errors; } else { workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( - null, + workInProgressRootConcurrentErrors, errors, ); } diff --git a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js index d6e37f2785ff2..b3164d5fe2dcd 100644 --- a/packages/react-reconciler/src/ReactFiberWorkLoop.old.js +++ b/packages/react-reconciler/src/ReactFiberWorkLoop.old.js @@ -925,7 +925,7 @@ export function queueRecoverableErrors(errors: Array) { workInProgressRootRecoverableErrors = errors; } else { workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply( - null, + workInProgressRootConcurrentErrors, errors, ); }