diff options
author | Puyodead1 <puyodead@proton.me> | 2023-12-05 16:52:30 -0500 |
---|---|---|
committer | Puyodead1 <puyodead@proton.me> | 2023-12-05 16:52:30 -0500 |
commit | 9c8a80693d5f6fcec7ae9a372c218a941726dfd9 (patch) | |
tree | f000e1c2b203b80ed9179ad6966f6017be37ef37 | |
parent | messageupdate: fix member not being correct format (diff) | |
download | server-9c8a80693d5f6fcec7ae9a372c218a941726dfd9.tar.xz |
handle possibly null activities in session sort
Diffstat (limited to '')
-rw-r--r-- | src/gateway/opcodes/LazyRequest.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gateway/opcodes/LazyRequest.ts b/src/gateway/opcodes/LazyRequest.ts index 4ad1ae7b..3c21b708 100644 --- a/src/gateway/opcodes/LazyRequest.ts +++ b/src/gateway/opcodes/LazyRequest.ts @@ -57,7 +57,7 @@ const getMostRelevantSession = (sessions: Session[]) => { return ( statusMap[a.status] - statusMap[b.status] + - (a.activities.length - b.activities.length) * 2 + ((a.activities?.length ?? 0) - (b.activities?.length ?? 0)) * 2 ); }); |