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:
Felix Fietkau 2025-05-30 21:27:52 +02:00
parent e29669dae1
commit 71bec727c8

View file

@ -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];