Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaruan committed Jul 8, 2022
1 parent 2940bd5 commit 7c6b39b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 22 deletions.
21 changes: 10 additions & 11 deletions packages/react-reconciler/src/ReactFiberCommitWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -3060,19 +3060,18 @@ function commitPassiveMountOnFiber(
// and add a start transition callback for each of them
const instance = finishedWork.stateNode;
if (
instance.pendingSuspenseBoundaries === null ||
instance.pendingSuspenseBoundaries.size === 0
instance.transitions !== null &&
(instance.pendingSuspenseBoundaries === null ||
instance.pendingSuspenseBoundaries.size === 0)
) {
if (instance.transitions !== null) {
instance.transitions.forEach(transition => {
addMarkerCompleteCallbackToPendingTransition({
transition,
name: finishedWork.memoizedProps.name,
});
instance.transitions.forEach(transition => {
addMarkerCompleteCallbackToPendingTransition({
transition,
name: finishedWork.memoizedProps.name,
});
instance.transitions = null;
instance.pendingSuspenseBoundaries = null;
}
});
instance.transitions = null;
instance.pendingSuspenseBoundaries = null;
}
}
break;
Expand Down
21 changes: 10 additions & 11 deletions packages/react-reconciler/src/ReactFiberCommitWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -3060,19 +3060,18 @@ function commitPassiveMountOnFiber(
// and add a start transition callback for each of them
const instance = finishedWork.stateNode;
if (
instance.pendingSuspenseBoundaries === null ||
instance.pendingSuspenseBoundaries.size === 0
instance.transitions !== null &&
(instance.pendingSuspenseBoundaries === null ||
instance.pendingSuspenseBoundaries.size === 0)
) {
if (instance.transitions !== null) {
instance.transitions.forEach(transition => {
addMarkerCompleteCallbackToPendingTransition({
transition,
name: finishedWork.memoizedProps.name,
});
instance.transitions.forEach(transition => {
addMarkerCompleteCallbackToPendingTransition({
transition,
name: finishedWork.memoizedProps.name,
});
instance.transitions = null;
instance.pendingSuspenseBoundaries = null;
}
});
instance.transitions = null;
instance.pendingSuspenseBoundaries = null;
}
}
break;
Expand Down

0 comments on commit 7c6b39b

Please sign in to comment.