3
0

Return empty arrays for empty report frames instead of null

This commit is contained in:
Tomaž Jerman
2022-09-30 14:45:44 +02:00
parent bdeb0dc7d3
commit ff5cba8508

View File

@@ -111,7 +111,7 @@ func (b *reportFrameBuilder) freshFrame() {
if b.frame != nil {
aux := *b.frame
b.frame = &aux
b.frame.Rows = nil
b.frame.Rows = []FrameRow{}
return
}
@@ -120,6 +120,8 @@ func (b *reportFrameBuilder) freshFrame() {
Source: b.def.Source,
Ref: b.def.Ref,
Rows: []FrameRow{},
Columns: b.def.Columns,
Sort: b.def.Sort,
Filter: b.def.Filter,