Skip to content

Commit

Permalink
add component check to type selector
Browse files Browse the repository at this point in the history
  • Loading branch information
AlyssaWang committed Jan 10, 2025
1 parent 3c20f59 commit 98e6b1f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/src/components/InputsModal/AuthTypeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ export interface InputAccessProps {
}

const AuthTypeSelector: FC<InputAccessProps> = ({ input, index, inputsMap, setInputsMap }) => {
const selectorSettings = input.options?.components
? input.options?.components[0]
const authComponent = input.options?.components?.find(
(component) => component.name === 'auth_type',
);

const selectorSettings = authComponent
? authComponent
: // Default auth type settings
{
name: 'auth_type',
Expand Down

0 comments on commit 98e6b1f

Please sign in to comment.