diff --git a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx index af3f579daea..b8caa5532a6 100644 --- a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx +++ b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceLinkCard.tsx @@ -29,14 +29,7 @@ export const ReferenceLinkCard = forwardRef(function ReferenceLinkCard( props: ReferenceLinkCardProps & React.HTMLProps, ref: React.ForwardedRef, ) { - const { - as: asProp, - // We exclude `documentId` from spread props to avoid passing it to the Card component - // eslint-disable-next-line @typescript-eslint/no-unused-vars - documentId, - documentType, - ...cardProps - } = props + const {as: asProp, documentId, documentType, ...cardProps} = props const dataAs = documentType ? 'a' : undefined // If the child link is clicked without a document type, an error will be thrown. @@ -48,6 +41,7 @@ export const ReferenceLinkCard = forwardRef(function ReferenceLinkCard( }