Fix crash when an app with a null name exists
This commit is contained in:
parent
bed1f0e092
commit
4d9e7cac31
|
@ -55,7 +55,7 @@
|
||||||
"Another app with the same name already exists",
|
"Another app with the same name already exists",
|
||||||
value => {
|
value => {
|
||||||
return !existingAppNames.some(
|
return !existingAppNames.some(
|
||||||
appName => dirty && appName.toLowerCase() === value.toLowerCase()
|
appName => dirty && appName?.toLowerCase() === value.toLowerCase()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
try {
|
try {
|
||||||
await obj.validate(values, { abortEarly: false })
|
await obj.validate(values, { abortEarly: false })
|
||||||
} catch (validationErrors) {
|
} catch (validationErrors) {
|
||||||
validationErrors.inner.forEach(error => {
|
validationErrors.inner?.forEach(error => {
|
||||||
$errors[error.path] = capitalise(error.message)
|
$errors[error.path] = capitalise(error.message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue