aboutsummaryrefslogtreecommitdiff
path: root/src/hypixelCached.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/hypixelCached.ts')
-rw-r--r--src/hypixelCached.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts
index f98f6d6..35f1cbb 100644
--- a/src/hypixelCached.ts
+++ b/src/hypixelCached.ts
@@ -8,7 +8,6 @@ import * as hypixel from './hypixel'
import { CleanPlayer } from './cleaners/player'
import { undashUuid } from './util'
import { CleanProfile, CleanFullProfile, CleanBasicProfile } from './cleaners/skyblock/profile'
-import { cleanProfileStats } from './cleaners/skyblock/stats'
// cache usernames for 4 hours
@@ -177,6 +176,9 @@ async function fetchBasicProfiles(user: string): Promise<CleanBasicProfile[]> {
* @param profile A profile name or profile uuid
*/
export async function fetchProfileUuid(user: string, profile: string) {
+ // if a profile wasn't provided, return
+ if (!profile) return null
+
const profiles = await fetchBasicProfiles(user)
const profileUuid = undashUuid(profile)