Update cell defaults to use empty array

pull/10616/head
Chris Goller 2018-02-05 17:04:15 -06:00
parent 3babccfa0c
commit e55b8116f7
1 changed files with 2 additions and 2 deletions

View File

@ -29,10 +29,10 @@ type dashboardCellResponse struct {
func newCellResponse(dID chronograf.DashboardID, cell chronograf.DashboardCell) dashboardCellResponse {
base := "/chronograf/v1/dashboards"
if cell.Queries == nil {
cell.Queries = make([]chronograf.DashboardQuery, 0)
cell.Queries = []chronograf.DashboardQuery{}
}
if cell.CellColors == nil {
cell.CellColors = make([]chronograf.CellColor, 0)
cell.CellColors = []chronograf.CellColor{}
}
// Copy to handle race condition