Skip to content

Commit

Permalink
Send empty array if properties is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
SumanthPuram committed Nov 25, 2019
1 parent 010e133 commit ca1ceeb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/source-debugger/source-debugger.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ func uploadEvents(eventBuffer []*EventSchemaT) {
}

func filterValues(message *MessageT) {
message.Properties = getKeys(message.Properties.(map[string]interface{}))
if message.Properties == nil {
message.Properties = make([]string, 0)
} else {
message.Properties = getKeys(message.Properties.(map[string]interface{}))
}
}

func getKeys(dataMap map[string]interface{}) []string {
Expand Down

0 comments on commit ca1ceeb

Please sign in to comment.