mirror of https://github.com/kubernetes/kops.git
Merge pull request #178 from justinsb/fix_zero_comparison
Guard against zero values when comparing values
This commit is contained in:
commit
c9759f4247
|
@ -72,6 +72,10 @@ func BuildChanges(a, e, changes interface{}) bool {
|
|||
|
||||
// equalFieldValues implements our equality checking, with special cases for resources and tasks
|
||||
func equalFieldValues(a, e reflect.Value) bool {
|
||||
if !a.IsValid() || !e.IsValid() {
|
||||
return a.IsValid() == e.IsValid()
|
||||
}
|
||||
|
||||
if a.Kind() == reflect.Map {
|
||||
return equalMapValues(a, e)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue