mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-14 00:06:46 +00:00
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")
|
||||
val = [ val ];
|
||||
if (length(val) == 0)
|
||||
val = [ "<none>" ];
|
||||
|
||||
for (let cur in val) {
|
||||
cur = format_entry(cur);
|
||||
|
Loading…
x
Reference in New Issue
Block a user