Made output of nil Meta maps useful
This commit is contained in:
parent
d3f96c348a
commit
29b7e17323
@ -182,6 +182,12 @@ func (h Handler) Meta(resp http.ResponseWriter, path []string) {
|
||||
}
|
||||
|
||||
cached:
|
||||
if meta == nil {
|
||||
// make output useful for nil maps
|
||||
fmt.Fprint(resp, "[]")
|
||||
return
|
||||
}
|
||||
|
||||
encoder := json.NewEncoder(resp)
|
||||
|
||||
if len(path) > 1 {
|
||||
|
Loading…
Reference in New Issue
Block a user