cli: return the correct data type for enum attributes

Return entries from the value array instead of the provided string

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2025-05-20 20:52:01 +02:00
parent 91d33d1563
commit 6296c17026

View file

@ -70,8 +70,7 @@ const types = {
val = lc(val);
val = filter(list, (v) => val == lc(v))[0];
} else {
if (index(list, val) < 0)
val = null;
val = filter(list, (v) => val == v)[0];
}
if (val == null)