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.
Andrew Clark committed
Feb 9, 2022 at 20:49 UTC
e0af1aabec3d3ee24f57aaaf9407860463f20213
2 files changed
+2
-2
packages/react-reconciler/src/ReactFiberWorkLoop.new.js
+1
-1
@@ -925,7 +925,7 @@ export function queueRecoverableErrors(errors: Array<mixed>) {
925
workInProgressRootRecoverableErrors = errors;
926
} else {
927
workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply(
928
- null,
928
+ workInProgressRootConcurrentErrors,
929
errors,
930
);
931
}
packages/react-reconciler/src/ReactFiberWorkLoop.old.js
+1
-1
@@ -925,7 +925,7 @@ export function queueRecoverableErrors(errors: Array<mixed>) {
925
workInProgressRootRecoverableErrors = errors;
926
} else {
927
workInProgressRootConcurrentErrors = workInProgressRootConcurrentErrors.push.apply(
928
- null,
928
+ workInProgressRootConcurrentErrors,
929
errors,
930
);
931
}