Merge pull request #4936 from nnethercote/fix-cache-splice
Fix PageView cache re-insertions.
This commit is contained in:
commit
69d722792d
@ -248,7 +248,7 @@ var Cache = function cacheCache(size) {
|
|||||||
this.push = function cachePush(view) {
|
this.push = function cachePush(view) {
|
||||||
var i = data.indexOf(view);
|
var i = data.indexOf(view);
|
||||||
if (i >= 0) {
|
if (i >= 0) {
|
||||||
data.splice(i);
|
data.splice(i, 1);
|
||||||
}
|
}
|
||||||
data.push(view);
|
data.push(view);
|
||||||
if (data.length > size) {
|
if (data.length > size) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user