mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #4936 from nnethercote/fix-cache-splice
Fix PageView cache re-insertions.
This commit is contained in:
commit
69d722792d
1 changed files with 1 additions and 1 deletions
|
@ -248,7 +248,7 @@ var Cache = function cacheCache(size) {
|
|||
this.push = function cachePush(view) {
|
||||
var i = data.indexOf(view);
|
||||
if (i >= 0) {
|
||||
data.splice(i);
|
||||
data.splice(i, 1);
|
||||
}
|
||||
data.push(view);
|
||||
if (data.length > size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue