Skip to content

Commit

Permalink
fix base case
Browse files Browse the repository at this point in the history
  • Loading branch information
friendlymatthew committed Jul 2, 2024
1 parent 763f3ee commit 6e63bf1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/btree/btree.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func (t *BTree) Insert(key pointer.ReferencedId, vector hnsw.Point) error {

func (t *BTree) Find(key pointer.ReferencedId) (pointer.ReferencedId, hnsw.Point, error) {
root, rootOffset, err := t.root()
if err != nil {
if err != nil || root == nil {
return pointer.ReferencedId{}, hnsw.Point{}, err
}

Expand Down

0 comments on commit 6e63bf1

Please sign in to comment.