fix for validators that don't have config (#21579)

fixes: #21528
This commit is contained in:
Erik Jan de Wit 2023-07-18 11:27:08 +02:00 committed by GitHub
parent cb05cc7f7f
commit 92c64e74f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -170,9 +170,7 @@ export default function NewAttributeSettings() {
const validations = profileConfig.validations.reduce(
(prevValidations, currentValidations) => {
prevValidations[currentValidations.key] =
currentValidations.value?.length === 0
? {}
: currentValidations.value;
currentValidations.value || {};
return prevValidations;
},
{} as Record<string, unknown>,