1
0
Fork 0
mirror of synced 2024-07-02 04:50:44 +12:00

Fix crash when an app with a null name exists

This commit is contained in:
Andrew Kingston 2022-01-24 19:06:41 +00:00
parent bed1f0e092
commit 4d9e7cac31

View file

@ -55,7 +55,7 @@
"Another app with the same name already exists",
value => {
return !existingAppNames.some(
appName => dirty && appName.toLowerCase() === value.toLowerCase()
appName => dirty && appName?.toLowerCase() === value.toLowerCase()
)
}
)
@ -67,7 +67,7 @@
try {
await obj.validate(values, { abortEarly: false })
} catch (validationErrors) {
validationErrors.inner.forEach(error => {
validationErrors.inner?.forEach(error => {
$errors[error.path] = capitalise(error.message)
})
}