mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
Minor patching
This commit is contained in:
@@ -26,7 +26,7 @@ var Cache = (function (_Array) {
|
||||
key = null;
|
||||
} else if (key === this[discrimS] && typeof value === "string") {
|
||||
return this[discrimCacheS][value] || null;
|
||||
} else if (value.constructor.name === 'RegExp') {
|
||||
} else if (value && value.constructor.name === 'RegExp') {
|
||||
var valid = function valid(item) {
|
||||
return value.test(item);
|
||||
};
|
||||
@@ -68,7 +68,7 @@ var Cache = (function (_Array) {
|
||||
if (typeof key === 'function') {
|
||||
var valid = key;
|
||||
key = null;
|
||||
} else if (value.constructor.name === 'RegExp') {
|
||||
} else if (value && value.constructor.name === 'RegExp') {
|
||||
var valid = function valid(item) {
|
||||
return value.test(item);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user