Skip to content

Commit 09dc3c0

Browse files
authored
fix useButton href condition (#7239)
1 parent 68e3057 commit 09dc3c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/@react-aria/button/src/useButton.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<
7575
additionalProps = {
7676
role: 'button',
7777
tabIndex: isDisabled ? undefined : 0,
78-
href: elementType === 'a' && isDisabled ? undefined : href,
78+
href: elementType === 'a' && !isDisabled ? href : undefined,
7979
target: elementType === 'a' ? target : undefined,
8080
type: elementType === 'input' ? type : undefined,
8181
disabled: elementType === 'input' ? isDisabled : undefined,

0 commit comments

Comments
 (0)