Skip to content

Commit

Permalink
avoid annotation/label panic with empty maps
Browse files Browse the repository at this point in the history
  • Loading branch information
orbatschow committed Oct 17, 2023
1 parent 65d1502 commit d7074ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/apis/minio.min.io/v2/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,12 @@ func GetClusterDomain() string {

// MergeMaps merges two maps and returns the union
func MergeMaps(a, b map[string]string) map[string]string {
if a == nil {
a = map[string]string{}
}
if b == nil {
b = map[string]string{}
}
for k, v := range b {
a[k] = v
}
Expand Down

0 comments on commit d7074ff

Please sign in to comment.