Skip to content

Commit

Permalink
avoid annotation/label panic with empty maps (#1824)
Browse files Browse the repository at this point in the history
  • Loading branch information
orbatschow committed Nov 14, 2023
1 parent 53deac5 commit 1d55a1a
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 @@ -905,6 +905,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 1d55a1a

Please sign in to comment.