From ec02b12b271ba0f0a096b007960c315f321dee05 Mon Sep 17 00:00:00 2001 From: abhijithvijayan <34790378+abhijithvijayan@users.noreply.github.com> Date: Thu, 9 Jul 2020 22:26:46 +0530 Subject: [PATCH] fix: invalidate form if api key is empty in options page --- source/Options/Form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Options/Form.tsx b/source/Options/Form.tsx index 16a6f78..57ed29b 100644 --- a/source/Options/Form.tsx +++ b/source/Options/Form.tsx @@ -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) ||