Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,9 @@ export function PopChild({ children, isPresent, anchorX, root }: Props) {
right: 0,
})
const { nonce } = useContext(MotionConfigContext)
const composedRef = useComposedRefs(
ref,
(children as { ref?: React.Ref<HTMLElement> })?.ref
)

const childRef = (children as any)?.ref ?? (children as any)?.props?.ref;
const composedRef = useComposedRefs(ref, childRef);

/**
* We create and inject a style block so we can apply this explicit
* sizing in a non-destructive manner by just deleting the style block.
Expand Down