mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 19:43:29 +01:00
Cache.remove fix (#437)
This commit is contained in:
@@ -132,6 +132,8 @@ var Cache = (function (_Array) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Cache.prototype.remove = function remove(data) {
|
Cache.prototype.remove = function remove(data) {
|
||||||
|
if (!this[discrimCacheS][data[this[discrimS]]]) return false;
|
||||||
|
|
||||||
delete this[discrimCacheS][data[this[discrimS]]];
|
delete this[discrimCacheS][data[this[discrimS]]];
|
||||||
for (var i in this) {
|
for (var i in this) {
|
||||||
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {
|
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ export default class Cache extends Array {
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove(data) {
|
remove(data) {
|
||||||
|
if(!this[discrimCacheS][data[this[discrimS]]]) return false;
|
||||||
|
|
||||||
delete this[discrimCacheS][data[this[discrimS]]];
|
delete this[discrimCacheS][data[this[discrimS]]];
|
||||||
for (var i in this) {
|
for (var i in this) {
|
||||||
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {
|
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user