Skip to content

Commit

Permalink
handle possibly null activities in session sort
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 5, 2023
1 parent e54879e commit 9c8a806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gateway/opcodes/LazyRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
});

Expand Down

0 comments on commit 9c8a806

Please sign in to comment.