diff --git a/mongox/common/loadarray.go b/mongox/common/loadarray.go index b7ce0c2..5505464 100644 --- a/mongox/common/loadarray.go +++ b/mongox/common/loadarray.go @@ -53,6 +53,8 @@ func LoadArray(db *mongox.Database, target interface{}, filters ...interface{}) elem := reflect.New(targetSliceElemT.Elem()) if result.Decode(elem.Interface()) != nil { targetSliceV = reflect.Append(targetSliceV, elem) + } else { + continue } } else { result.Decode(targetSliceV.Index(i).Interface())