Skip to content

Commit

Permalink
old
Browse files Browse the repository at this point in the history
  • Loading branch information
lunaruan committed Jul 8, 2022
1 parent 31c4a27 commit 268d70a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
9 changes: 9 additions & 0 deletions packages/react-reconciler/src/ReactFiberBeginWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,15 @@ function updateTracingMarkerComponent(
};
workInProgress.stateNode = markerInstance;
}
} else {
if (__DEV__) {
if (current.memoizedProps.name !== workInProgress.pendingProps.name) {
console.error(
'Changing the name of a tracing marker after mount is not supported. ' +
'To remount the tracing marker, pass it a new key.',
);
}
}
}

const instance: TracingMarkerInstance | null = workInProgress.stateNode;
Expand Down
16 changes: 9 additions & 7 deletions packages/react-reconciler/src/ReactFiberCommitWork.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -3044,14 +3044,16 @@ function commitPassiveMountOnFiber(
instance.pendingSuspenseBoundaries === null ||
instance.pendingSuspenseBoundaries.size === 0
) {
instance.transitions.forEach(transition => {
addMarkerCompleteCallbackToPendingTransition({
transition,
name: finishedWork.memoizedProps.name,
if (instance.transitions !== null) {
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 268d70a

Please sign in to comment.