skiplist: Save entry in `_insertKeyAtPoint()`

pull/5003/head
Richard Hansen 2021-04-11 23:36:44 -04:00
parent 0e424fa8c3
commit 8ae40e80f9
1 changed files with 1 additions and 2 deletions

View File

@ -116,6 +116,7 @@ class SkipList {
_insertKeyAtPoint(point, entry) {
const newNode = {
key: entry.key,
entry,
levels: 0,
upPtrs: [],
downPtrs: [],
@ -277,8 +278,6 @@ class SkipList {
for (let i = (newEntryArray.length - 1); i >= 0; i--) {
const entry = newEntryArray[i];
this._insertKeyAtPoint(pt, entry);
const node = this._getNodeByKey(entry.key);
node.entry = entry;
}
}