mirror of
https://github.com/spacebarchat/server.git
synced 2026-03-31 00:45:41 +00:00
handle possibly null activities in session sort
This commit is contained in:
@@ -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
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user