Skip to content

Commit

Permalink
fix: invalidate form if api key is empty in options page
Browse files Browse the repository at this point in the history
  • Loading branch information
abhijithvijayan committed Jul 9, 2020
1 parent af0bad2 commit ec02b12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/Options/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ const Form: React.FC = () => {
setFieldError: setFormStateFieldError,
} = formState;

// ToDo: invalidate if api key is empty
const isFormValid: boolean =
((formStateValidity.apikey === undefined || formStateValidity.apikey) &&
formStateValues.apikey !== '' && // invalidate if api key is empty
formStateErrors.apikey === undefined &&
(((formStateValidity.host === undefined || formStateValidity.host) &&
formStateErrors.host === undefined) ||
Expand Down

0 comments on commit ec02b12

Please sign in to comment.