Fix project sorting on node page when there is no activity data

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-08-16 12:55:39 +02:00
parent 492ff5b07c
commit 0c0842e6f3
+1 -1
View File
@@ -60,7 +60,7 @@ export async function loadProjects(
);
// Sorts projects by most recent commit descending.
const sortedProjects = results.sort(
(a, b) => b.activity[0].time - a.activity[0].time,
(a, b) => b.activity[0]?.time - a.activity[0]?.time,
);
return {