Fixed server update listener

This commit is contained in:
hydrabolt
2015-11-01 14:09:00 +00:00
parent 5adcb5b8eb
commit 7175218ecf
14 changed files with 129 additions and 12 deletions

View File

@@ -69,8 +69,9 @@ var Cache = (function (_Array) {
};
Cache.prototype.update = function update(old, data) {
var index = this.get(this.discrim, old);
if (~index) {
var item = this.get(this.discrim, old[this.discrim]);
if (item) {
var index = this.indexOf(item);
this[index] = data;
return this[index];
} else {
@@ -83,7 +84,7 @@ var Cache = (function (_Array) {
if (~index) {
this.splice(index, 1);
} else {
var item = this.get(this.discrim, data.id);
var item = this.get(this.discrim, data[this.discrim]);
if (item) {
this.splice(this.indexOf(item), 1);
}

View File

@@ -27,6 +27,11 @@ var Equality = (function () {
return false;
};
Equality.prototype.equalsStrict = function equalsStrict(object) {
// override per class type
return;
};
_createClass(Equality, [{
key: "eqDiscriminator",
get: function get() {