From 9c8a80693d5f6fcec7ae9a372c218a941726dfd9 Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Tue, 5 Dec 2023 16:52:30 -0500 Subject: handle possibly null activities in session sort --- src/gateway/opcodes/LazyRequest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 ); }); -- cgit 1.4.1