mirror of
https://github.com/niusmallnan/steve.git
synced 2025-07-05 10:46:19 +00:00
Don't ever sent data == nil
This commit is contained in:
parent
e64845dcb9
commit
d1ce16f351
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user