From d85e645d903c48fee0b5593400f23f69c1b2786a Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 21 May 2022 16:32:01 -0500 Subject: fix profile sorting --- src/hypixelCached.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/hypixelCached.ts b/src/hypixelCached.ts index cf055da..d94d1f5 100644 --- a/src/hypixelCached.ts +++ b/src/hypixelCached.ts @@ -274,8 +274,8 @@ export async function fetchSkyblockProfiles(playerUuid: string): Promise { const memberA = a.members?.find(m => m.uuid === playerUuid) const memberB = b.members?.find(m => m.uuid === playerUuid) - if (!memberA || !memberB || !memberA.lastSave || !memberB.lastSave) return 0 - return memberB.lastSave - memberA.lastSave + + return (memberB?.lastSave ?? 0) - (memberA?.lastSave ?? 0) }) // cache the profiles -- cgit