mirror of
https://github.com/danbulant/discord.js
synced 2026-07-06 11:40:41 +00:00
Fix #331
This commit is contained in:
parent
726c0e9ed5
commit
963b22e6ce
2 changed files with 2 additions and 2 deletions
|
|
@ -134,7 +134,7 @@ var Cache = (function (_Array) {
|
||||||
Cache.prototype.remove = function remove(data) {
|
Cache.prototype.remove = function remove(data) {
|
||||||
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[discrimS]] === data[this[discrimS]]) {
|
if (this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {
|
||||||
this.splice(i, 1);
|
this.splice(i, 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ export default class Cache extends Array {
|
||||||
remove(data) {
|
remove(data) {
|
||||||
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[discrimS]] === data[this[discrimS]]) {
|
if(this[i] && this[i][this[discrimS]] === data[this[discrimS]]) {
|
||||||
this.splice(i, 1);
|
this.splice(i, 1);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue