cli: fix showing empty lists

Display <none> as value instead of hiding the attribute name

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2025-03-11 13:37:33 +01:00
parent ae31c0ddd7
commit a46a55b407

View File

@ -345,6 +345,8 @@ function format_multiline(prefix, val)
if (type(val) != "array")
val = [ val ];
if (length(val) == 0)
val = [ "<none>" ];
for (let cur in val) {
cur = format_entry(cur);