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:
parent
e29669dae1
commit
71bec727c8
1 changed files with 2 additions and 0 deletions
|
@ -64,6 +64,8 @@ const types = {
|
||||||
return val;
|
return val;
|
||||||
|
|
||||||
let list = this.value;
|
let list = this.value;
|
||||||
|
if (type(list) == "object")
|
||||||
|
list = keys(list);
|
||||||
if (this.ignore_case) {
|
if (this.ignore_case) {
|
||||||
val = lc(val);
|
val = lc(val);
|
||||||
val = filter(list, (v) => val == lc(v))[0];
|
val = filter(list, (v) => val == lc(v))[0];
|
||||||
|
|
Loading…
Reference in a new issue