Skip to content

Commit 7c0e286

Browse files
authored
fix(Card): fix undefined id in Card (#7085)
* fix undefined id in Card * remove useId
1 parent 5bb6a22 commit 7c0e286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-spectrum/s2/src/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ export const Card = forwardRef(function Card(props: CardProps, ref: DOMRef<HTMLD
419419
return (
420420
<div
421421
{...filterDOMProps(otherProps)}
422-
id={String(id)}
422+
id={id != null ? String(id) : undefined}
423423
// @ts-ignore - React < 19 compat
424424
inert={isSkeleton ? 'true' : undefined}
425425
ref={domRef}

0 commit comments

Comments
 (0)