mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
fixed references to update items
This commit is contained in:
@@ -104,6 +104,11 @@ var User = (function (_Equality) {
|
||||
return _Constants.Endpoints.AVATAR(this.id, this.avatar);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "name",
|
||||
get: function get() {
|
||||
return this.username;
|
||||
}
|
||||
}]);
|
||||
|
||||
return User;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user