Skip to content

Commit

Permalink
Fix suspense replaying forwardRefs (facebook#26385)
Browse files Browse the repository at this point in the history
  • Loading branch information
hansottowirtz committed Mar 17, 2023
1 parent 5530855 commit 3864bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberWorkLoop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@ function replaySuspendedUnitOfWork(unitOfWork: Fiber): void {
// TODO: Consider moving this switch statement into that module. Also,
// could maybe use this as an opportunity to say `use` doesn't work with
// `defaultProps` :)
const Component = unitOfWork.type;
const Component = unitOfWork.tag === FunctionComponent ? unitOfWork.type : unitOfWork.type.render;
const unresolvedProps = unitOfWork.pendingProps;
const resolvedProps =
unitOfWork.elementType === Component
Expand Down

0 comments on commit 3864bae

Please sign in to comment.