Skip to content

Commit

Permalink
alternate conditional props notation to fix the `_owner="[object Obje…
Browse files Browse the repository at this point in the history
…ct]"` problem
  • Loading branch information
HowardBraham committed Sep 18, 2023
1 parent a58bc77 commit cb667dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/components/component-library/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const Input: InputComponent = React.forwardRef(
},
className,
)}
{...(error && <>aria-invalid={error}</>)} // This stops it from including the attribute when `aria-invalid="false"`
{...(error && { 'aria-invalid': error })}
as="input"
autoComplete={autoComplete ? 'on' : 'off'}
autoFocus={autoFocus}
Expand Down
2 changes: 1 addition & 1 deletion ui/components/component-library/text-field/text-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export const TextField = ({
>
{startAccessory}
<InputComponent
{...(error && <>aria-invalid={error}</>)} // This stops it from including the attribute when `aria-invalid="false"`
{...(error && { 'aria-invalid': error })}
autoComplete={autoComplete}
autoFocus={autoFocus}
backgroundColor={BackgroundColor.transparent}
Expand Down

0 comments on commit cb667dc

Please sign in to comment.