mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-09 20:22:47 +01:00
handle possibly null activities in session sort
This commit is contained in:
parent
e54879e1fe
commit
9c8a80693d
@ -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
|
||||
);
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user