Merge pull request #178 from justinsb/fix_zero_comparison

Guard against zero values when comparing values
This commit is contained in:
Justin Santa Barbara 2016-07-20 20:00:35 -04:00 committed by GitHub
commit c9759f4247
1 changed files with 4 additions and 0 deletions

View File

@ -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)
}