mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-22 18:56:54 +00:00
fix validity check
This commit is contained in:
1 parent
a8e6f5cf26
commit
ca1f2dd1c3
1 file changed
+2
-2
@@ -178,7 +178,7 @@ const VaultPage = (props) => {
|
||||
const isAuthorValid = authorInput.validity.valid && authorInput.value;
|
||||
const isCheckboxChecked = legacyCheckbox.checked || v3Checkbox.checked;
|
||||
|
||||
const isFormValid = isTitleValid && isAuthorValid && isCheckboxChecked;
|
||||
const isFormValid = (isTitleValid || isAuthorValid) && isCheckboxChecked;
|
||||
|
||||
return isFormValid;
|
||||
};
|
||||
@@ -186,7 +186,7 @@ const VaultPage = (props) => {
|
||||
const disableSubmitIfFormInvalid = () => {
|
||||
const { current: submitButton } = searchButtonRef;
|
||||
|
||||
submitButton.disabled = validateForm();
|
||||
submitButton.disabled = !validateForm();
|
||||
};
|
||||
|
||||
const renderForm = () => (
|
||||
|
||||
Reference in new issue
Block a user