Skip to content

Commit

Permalink
Nit: pendingProps -> memoizedProps
Browse files Browse the repository at this point in the history
  • Loading branch information
acdlite committed Sep 23, 2022
1 parent 4320341 commit 497d6b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/react-reconciler/src/ReactFiberCommitWork.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import type {
OffscreenState,
OffscreenInstance,
OffscreenQueue,
OffscreenProps,
} from './ReactFiberOffscreenComponent';
import type {HookFlags} from './ReactHookEffectTags';
import type {Cache} from './ReactFiberCacheComponent.new';
Expand Down Expand Up @@ -1124,7 +1125,8 @@ function commitLayoutEffectOnFiber(
);
}
if (flags & Ref) {
if (finishedWork.pendingProps.mode === 'manual') {
const props: OffscreenProps = finishedWork.memoizedProps;
if (props.mode === 'manual') {
safelyAttachRef(finishedWork, finishedWork.return);
} else {
safelyDetachRef(finishedWork, finishedWork.return);
Expand Down

0 comments on commit 497d6b0

Please sign in to comment.