From ffd6d516cc5826e134a55fbac945939b4ff3aea3 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 14 Oct 2018 21:26:18 +0800 Subject: [PATCH] fix error --- router/api/line.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/router/api/line.go b/router/api/line.go index 4b7cd3d..3636621 100644 --- a/router/api/line.go +++ b/router/api/line.go @@ -18,7 +18,10 @@ func GetLineList(c *context.Context) { list := make([]map[string]interface{}, 0) if ls != nil { - for v := range ls { + for _, v := range ls { + if v == nil { + continue + } list = append(list, utils.ToMap(v)) } }