mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Fix #331
This commit is contained in:
@@ -134,7 +134,7 @@ var Cache = (function (_Array) {
|
||||
Cache.prototype.remove = function remove(data) {
|
||||
delete this[discrimCacheS][data[this[discrimS]]];
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ export default class Cache extends Array {
|
||||
remove(data) {
|
||||
delete this[discrimCacheS][data[this[discrimS]]];
|
||||
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);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user