mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 03:33:33 +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