refactor: make it obvious what it's doing

This commit is contained in:
siiky 2024-09-02 12:48:48 +01:00
parent c3c837f87d
commit fc47944ac8

View file

@ -126,9 +126,9 @@ const validationSchema = Yup.object().shape({
'unique-name',
'Machine name is already in use.',
(value, context) =>
!R.any(
it => R.equals(R.toLower(it), R.toLower(value)),
context.options.context.machineNames
!R.includes(
R.toLower(value),
R.map(R.toLower, context.options.context.machineNames)
)
)
})