mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 03:03:59 +00:00
[apimachinery] Remove map nil check before delete in mergeMap
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
This commit is contained in:
parent
3c31a0026a
commit
5e0b20fcd6
@ -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