Skip to content

Commit

Permalink
getBytes: return nil instead of []byte{} when nil
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Feb 14, 2024
1 parent bcb3636 commit 3817863
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions flow/model/qvalue/qvalue.go
Original file line number Diff line number Diff line change
Expand Up @@ -587,8 +587,7 @@ func getBytes(v interface{}) ([]byte, bool) {
case string:
return []byte(value), true
case nil:
// return empty byte array
return []byte{}, true
return nil, true
default:
return nil, false
}
Expand Down

0 comments on commit 3817863

Please sign in to comment.