Skip to content

Commit

Permalink
fix array assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
fredcarle committed Jan 8, 2024
1 parent 21a278e commit f78e33b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func NewDocsFromJSON(obj []byte, sd SchemaDescription) ([]*Document, error) {
}

docs := make([]*Document, len(a))
for _, v := range a {
for i, v := range a {
o, err := v.Object()
if err != nil {
return nil, err
Expand All @@ -165,7 +165,7 @@ func NewDocsFromJSON(obj []byte, sd SchemaDescription) ([]*Document, error) {
if err != nil {
return nil, err
}
docs = append(docs, doc)
docs[i] = doc
}

return docs, nil
Expand Down

0 comments on commit f78e33b

Please sign in to comment.