diff options
Diffstat (limited to 'modules/luci-base/ucode/controller/admin')
-rw-r--r-- | modules/luci-base/ucode/controller/admin/index.uc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/luci-base/ucode/controller/admin/index.uc b/modules/luci-base/ucode/controller/admin/index.uc index 16a74abc46..f0f7c7fd4d 100644 --- a/modules/luci-base/ucode/controller/admin/index.uc +++ b/modules/luci-base/ucode/controller/admin/index.uc @@ -23,8 +23,10 @@ function ubus_reply(id, data, code, errmsg) { reply.error = { code, message: errmsg }; else if (type(code) == 'object') reply.result = code; - else + else if (data != null) reply.result = [ code, data ]; + else + reply.result = [ code ]; return reply; } |