1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-25 02:50:08 +03:00

M #~: Fix minor in utils (#1575)

(cherry picked from commit 6351af28d4a51ed5f579f228dfce5a12486af4e2)
This commit is contained in:
Sergio Betanzos 2021-11-16 10:14:19 +01:00 committed by Tino Vazquez
parent 5137674ad4
commit bf14342885

View File

@ -255,7 +255,7 @@ export const schemaUserInput = ({ mandatory, name, type, options, defaultValue }
.trim()
.concat(requiredSchema(mandatory, name, string()))
.oneOf(values.map(({ value }) => value))
.default(defaultValue ?? firstOption)
.default(defaultValue || firstOption)
}
}
case 'array': {