Skip to content

Commit

Permalink
Fix indexOf not-yet-inserted key.
Browse files Browse the repository at this point in the history
Closes #658.
  • Loading branch information
flatheadmill committed Sep 20, 2020
1 parent bf0d0bd commit 148f862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cursor.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Cursor {
}
// We only insert before the key on the left most page.
if (~index == 0) {
return this.page.id == '0.1' || comparator(this.page.key, key) < 0
return this.page.id == '0.1' || comparator(this.page.key, key) <= 0
? { index: ~index, found: false }
: { index: null, found: false }
}
Expand Down

0 comments on commit 148f862

Please sign in to comment.