cli: fix dealing with enum types with object value lists
Convert to array before calling filter() Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -64,6 +64,8 @@ const types = {
|
||||
return val;
|
||||
|
||||
let list = this.value;
|
||||
if (type(list) == "object")
|
||||
list = keys(list);
|
||||
if (this.ignore_case) {
|
||||
val = lc(val);
|
||||
val = filter(list, (v) => val == lc(v))[0];
|
||||
|
||||
Reference in New Issue
Block a user