mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 03:31:03 +00:00
Cache.remove fix (#437)
This commit is contained in:
parent
ba51df918c
commit
d7026f80a4
2 changed files with 4 additions and 0 deletions
|
|
@ -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]]) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue