From 8ae40e80f912f0d780743e6c571f1eeb258a77cf Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sun, 11 Apr 2021 23:36:44 -0400 Subject: [PATCH] skiplist: Save entry in `_insertKeyAtPoint()` --- src/static/js/skiplist.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/static/js/skiplist.js b/src/static/js/skiplist.js index c32e7cce3..1bacce43c 100644 --- a/src/static/js/skiplist.js +++ b/src/static/js/skiplist.js @@ -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; } }