mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
Fixed server update listener
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user