Skip to content

Commit 0ef6c8f

Browse files
committed
fix: avoid returning empty values
1 parent ca735ce commit 0ef6c8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scanner.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ func (r *Reader) Iter() iter.Seq2[[]byte, error] {
281281
return
282282
}
283283

284+
if buf.Len() == 0 {
285+
return
286+
}
287+
284288
if !yield(buf.Bytes(), nil) || !r.Next() {
285289
return
286290
}

0 commit comments

Comments
 (0)