mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Cache now returns null when using get(cacheID) with invalid ID (#441)
* Cache now returns `null` when using get(cacheID) where the ID is invalid. * Documented `get(id)` * Adjusted version in conf.py to 8.0.0
This commit is contained in:
@@ -15,6 +15,8 @@ export default class Cache extends Array {
|
||||
if (typeof key === 'function') {
|
||||
var valid = key;
|
||||
key = null;
|
||||
} else if (key && !value) {
|
||||
return this[discrimCacheS][key] || null;
|
||||
} else if (key === this[discrimS] && typeof value === "string") {
|
||||
return this[discrimCacheS][value] || null;
|
||||
} else if (value && value.constructor.name === 'RegExp') {
|
||||
|
||||
Reference in New Issue
Block a user