[fix] dirty fix when there's choices and the type is string

This commit is contained in:
Tagada 2022-08-15 20:12:26 +02:00 committed by GitHub
parent 75860df0ef
commit dc9f331754
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ export function formatYunoHostArgument (arg) {
name: 'InputItem',
props: defaultProps.concat(['autocomplete', 'trim', 'choices']),
callback: function () {
if (arg.choices && arg.choices.length) {
if (arg.choices && Object.keys(arg.choices).length) {
arg.type = 'select'
this.name = 'SelectItem'
}