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:
parent
ae31c0ddd7
commit
a46a55b407
@ -345,6 +345,8 @@ function format_multiline(prefix, val)
|
|||||||
|
|
||||||
if (type(val) != "array")
|
if (type(val) != "array")
|
||||||
val = [ val ];
|
val = [ val ];
|
||||||
|
if (length(val) == 0)
|
||||||
|
val = [ "<none>" ];
|
||||||
|
|
||||||
for (let cur in val) {
|
for (let cur in val) {
|
||||||
cur = format_entry(cur);
|
cur = format_entry(cur);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user