Cache.remove fix (#437)

This commit is contained in:
Manuel Kraus
2016-06-21 18:36:32 +02:00
committed by abal
parent ba51df918c
commit d7026f80a4
2 changed files with 4 additions and 0 deletions

View File

@@ -132,6 +132,8 @@ var Cache = (function (_Array) {
};
Cache.prototype.remove = function remove(data) {
if (!this[discrimCacheS][data[this[discrimS]]]) return false;
delete this[discrimCacheS][data[this[discrimS]]];
for (var i in this) {
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {

View File

@@ -96,6 +96,8 @@ export default class Cache extends Array {
}
remove(data) {
if(!this[discrimCacheS][data[this[discrimS]]]) return false;
delete this[discrimCacheS][data[this[discrimS]]];
for (var i in this) {
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {