Skip to content

Commit

Permalink
Update iterator.go
Browse files Browse the repository at this point in the history
  • Loading branch information
DeVikingMark authored Feb 27, 2025
1 parent 0bce70d commit bad6f16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,13 @@ func (iter *Iterator) Next() {
}

node, err := iter.t.next()
// TODO: double-check if this error is correctly handled.
// Properly handle the error by storing it in iter.err
if node == nil || err != nil {
iter.t = nil
iter.valid = false
if err != nil {
iter.err = err
}
return
}

Expand Down

0 comments on commit bad6f16

Please sign in to comment.