From f06fcf0101547c2c99d5414a966c57ee947584fd Mon Sep 17 00:00:00 2001 From: Pasha Puzikov Date: Mon, 2 Apr 2018 15:36:30 +0300 Subject: [PATCH] =?UTF-8?q?slice=20=E2=86=92=20splice=20while=20moving=20e?= =?UTF-8?q?ntry=20to=20the=20top?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lruCache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lruCache.js b/src/lruCache.js index d554d53..de23072 100755 --- a/src/lruCache.js +++ b/src/lruCache.js @@ -10,7 +10,7 @@ export default function lruCache(limit, equals) { // Cached entry not at top of cache, move it to the top if (cacheIndex > 0) { - entries.slice(cacheIndex, 1) + entries.splice(cacheIndex, 1) entries.unshift(entry) }