fixed references to update items

This commit is contained in:
Amish Shah
2016-01-01 18:27:08 +00:00
parent 21be3d3c77
commit 2000b62b36
6 changed files with 19 additions and 2 deletions

View File

@@ -74,9 +74,10 @@ var Cache = (function (_Array) {
Cache.prototype.update = function update(old, data) {
var item = this.get(this[discrimS], old[this[discrimS]]);
if (item) {
var index = this.indexOf(item);
this[index] = data;
Object.assign(this[index], data);
this[discrimCacheS][data[this[discrimS]]] = this[index];
return this[index];
} else {