diff --git a/lru.js b/lru.js index d2657ee..cbc0302 100644 --- a/lru.js +++ b/lru.js @@ -193,7 +193,7 @@ class LRUMap { entry[OLDER][NEWER] = undefined; // link the newer entry to head this.newest = entry[OLDER]; - } else {// if(entry[OLDER] === undefined && entry.newer === undefined) { + } else {// if(entry[OLDER] === undefined && entry[NEWER] === undefined) { this.oldest = this.newest = undefined; }