Skip to content

Commit

Permalink
fix(react): change button href check from key to value (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
rabelloo authored and Julius Osokinas committed Apr 20, 2021
1 parent a756638 commit 4a349e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react/src/components/button/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Button: ButtonComponent = ({
}: ButtonProps<'a'> | ButtonProps<'button'>) => {
const { disabled } = useField();

const Element = 'href' in restProps ? 'a' : 'button';
const Element = (restProps as ButtonProps<'a'>).href ? 'a' : 'button';

return (
<Element
Expand Down

0 comments on commit 4a349e1

Please sign in to comment.