Skip to content

Commit

Permalink
perf(mutate): getUpdatee same level uses nextTuple
Browse files Browse the repository at this point in the history
  • Loading branch information
tabcat committed Dec 23, 2024
1 parent 05408a6 commit bd20bf7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/mutate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,12 @@ export async function getUpdatee(
},
);
} else {
// do cursor.moveTo if same level of cursor?
await cursor.jumpTo(tuple, level);
if (level === cursor.level()) {
await cursor.nextTuple(tuple);
} else {
await cursor.jumpTo(tuple, level);
}

return cursor.currentBucket();
}
}
Expand Down

0 comments on commit bd20bf7

Please sign in to comment.