Don't ever sent data == nil

This commit is contained in:
Darren Shepherd 2020-02-10 20:51:48 -07:00
parent e64845dcb9
commit d1ce16f351

View File

@ -48,6 +48,10 @@ func (j *EncodingResponseWriter) convertList(apiOp *types.APIRequest, input type
apiOp.Schema.CollectionFormatter(apiOp, collection)
}
if collection.Data == nil {
collection.Data = []*types.RawResource{}
}
return collection
}