Skip to content

Commit 53e2f54

Browse files
committed
fix: revert formErrorCount update
1 parent 58b53db commit 53e2f54

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Pages/GlobalConfigurations/BuildInfra/ProfileForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ const ProfileForm: FunctionComponent = () => {
2828
// Would use this to disable the save button, if all keys in profileInputErrors are null or undefined, then there are no errors
2929
// Empty string means isRequired but no need to show error below input field
3030
const formErrorCount = useMemo(
31-
() => Object.keys(profileInputErrors).filter((item) => !profileInputErrors[item]).length,
31+
() =>
32+
Object.keys(profileInputErrors).filter(
33+
(item) => profileInputErrors[item] !== null && profileInputErrors[item] !== undefined,
34+
).length,
3235
[profileInputErrors],
3336
)
3437

0 commit comments

Comments
 (0)