Skip to content

Commit

Permalink
- fixes wrong usage of is nil API
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Jan 16, 2024
1 parent 1d65678 commit 504f5f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/inmemory_backing_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ func (i *InMemoryBackingStore) Enumerate() map[string]interface{} {
func (i *InMemoryBackingStore) EnumerateKeysForValuesChangedToNil() []string {
keys := make([]string, 0)
for k, v := range i.store {
if i.changedValues[k] && (v == nil || reflect.ValueOf(v).IsNil()) {
valueOfV := reflect.ValueOf(v)
if i.changedValues[k] && (v == nil || valueOfV.Kind() == reflect.Ptr && valueOfV.IsNil()) {
keys = append(keys, k)
}
}
Expand Down

0 comments on commit 504f5f5

Please sign in to comment.