Fix js error when custom sql query returns no results

This commit is contained in:
Dan Sosedoff
2016-01-20 09:21:31 -06:00
parent d3f12802a3
commit bd207a3551
3 changed files with 8 additions and 3 deletions

View File

@@ -239,6 +239,11 @@ func (client *Client) query(query string, args ...interface{}) (*Result, error)
return nil, err
}
// Make sure to never return null colums
if cols == nil {
cols = []string{}
}
result := Result{
Columns: cols,
Rows: []Row{},