Merge pull request #460 from YunoHost/fix-app-install

[fix] App install is broken when there's choices and the type is string
This commit is contained in:
Alexandre Aubin 2022-08-15 20:41:40 +02:00 committed by GitHub
commit 90c6adffd3
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'
}