Skip to content

Commit a776163

Browse files
committed
fix index Less panic
1 parent 0dbb007 commit a776163

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Release 2.3.5(2024-03-03)
2+
## 🐞 Bug Fixes
3+
* Fix index Less function panic.
4+
15
# Release 2.3.4(2024-01-07)
26

37
## 🎄 Enhancements

index/btree.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ func newBTree() *MemoryBTree {
2828
}
2929

3030
func (it *item) Less(bi btree.Item) bool {
31+
if bi == nil {
32+
return false
33+
}
3134
return bytes.Compare(it.key, bi.(*item).key) < 0
3235
}
3336

0 commit comments

Comments
 (0)