mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
skiplist: Save entry in _insertKeyAtPoint()
This commit is contained in:
parent
0e424fa8c3
commit
8ae40e80f9
1 changed files with 1 additions and 2 deletions
|
@ -116,6 +116,7 @@ class SkipList {
|
||||||
_insertKeyAtPoint(point, entry) {
|
_insertKeyAtPoint(point, entry) {
|
||||||
const newNode = {
|
const newNode = {
|
||||||
key: entry.key,
|
key: entry.key,
|
||||||
|
entry,
|
||||||
levels: 0,
|
levels: 0,
|
||||||
upPtrs: [],
|
upPtrs: [],
|
||||||
downPtrs: [],
|
downPtrs: [],
|
||||||
|
@ -277,8 +278,6 @@ class SkipList {
|
||||||
for (let i = (newEntryArray.length - 1); i >= 0; i--) {
|
for (let i = (newEntryArray.length - 1); i >= 0; i--) {
|
||||||
const entry = newEntryArray[i];
|
const entry = newEntryArray[i];
|
||||||
this._insertKeyAtPoint(pt, entry);
|
this._insertKeyAtPoint(pt, entry);
|
||||||
const node = this._getNodeByKey(entry.key);
|
|
||||||
node.entry = entry;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue