Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
slice → splice while moving entry to the top
  • Loading branch information
heydiplo committed Apr 2, 2018
commit f06fcf0101547c2c99d5414a966c57ee947584fd
2 changes: 1 addition & 1 deletion src/lruCache.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down