Skip to content

Commit d1e7f28

Browse files
committed
Make guarded callback more local for mutation phase
1 parent 161be62 commit d1e7f28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-reconciler/src/ReactFiberCommitWork.new.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,6 +2208,7 @@ function commitMutationEffects_begin(root: FiberRoot) {
22082208
function commitMutationEffects_complete(root: FiberRoot) {
22092209
while (nextEffect !== null) {
22102210
const fiber = nextEffect;
2211+
if (fiber.flags !== NoFlags) {
22112212
if (__DEV__) {
22122213
setCurrentDebugFiberInDEV(fiber);
22132214
invokeGuardedCallback(
@@ -2229,6 +2230,7 @@ function commitMutationEffects_complete(root: FiberRoot) {
22292230
captureCommitPhaseError(fiber, fiber.return, error);
22302231
}
22312232
}
2233+
}
22322234

22332235
const sibling = fiber.sibling;
22342236
if (sibling !== null) {

0 commit comments

Comments
 (0)