mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
Merge pull request #92517 from gaurav1086/mergeMap_remove_map_nil_check
[apimachinery] Remove map nil check before delete in mergeMap
This commit is contained in:
commit
7af930f2b8
@ -1321,9 +1321,7 @@ func mergeMap(original, patch map[string]interface{}, schema LookupPatchMeta, me
|
|||||||
// Preserving the null value is useful when we want to send an explicit
|
// Preserving the null value is useful when we want to send an explicit
|
||||||
// delete to the API server.
|
// delete to the API server.
|
||||||
if patchV == nil {
|
if patchV == nil {
|
||||||
if _, ok := original[k]; ok {
|
|
||||||
delete(original, k)
|
delete(original, k)
|
||||||
}
|
|
||||||
if mergeOptions.IgnoreUnmatchedNulls {
|
if mergeOptions.IgnoreUnmatchedNulls {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user