diff options
-rw-r--r-- | build/hypixelCached.js | 2 | ||||
-rw-r--r-- | src/hypixelCached.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/build/hypixelCached.js b/build/hypixelCached.js index 00cc828..d41da97 100644 --- a/build/hypixelCached.js +++ b/build/hypixelCached.js @@ -102,7 +102,7 @@ async function uuidFromUser(user) { // check if the username is a value const uuidToUsername = usernameCache.mget(usernameCache.keys()); for (const [uuid, username] of Object.entries(uuidToUsername)) { - if (username.toLowerCase && user.toLowerCase() === username.toLowerCase()) + if (username && username.toLowerCase && user.toLowerCase() === username.toLowerCase()) return uuid; } if (_1.debug) diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts index 71e9de9..f76c52a 100644 --- a/src/hypixelCached.ts +++ b/src/hypixelCached.ts @@ -90,7 +90,7 @@ export async function uuidFromUser(user: string): Promise<string> { // check if the username is a value const uuidToUsername: {[ key: string ]: string} = usernameCache.mget(usernameCache.keys()) for (const [ uuid, username ] of Object.entries(uuidToUsername)) { - if (username.toLowerCase && user.toLowerCase() === username.toLowerCase()) + if (username && username.toLowerCase && user.toLowerCase() === username.toLowerCase()) return uuid } |