From 0c0842e6f34a84530c2f3609d6306daf7908447f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 16 Aug 2023 12:55:39 +0200 Subject: [PATCH] Fix project sorting on node page when there is no activity data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rūdolfs Ošiņš --- src/views/nodes/router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/nodes/router.ts b/src/views/nodes/router.ts index d22705cd5..2f8c67c21 100644 --- a/src/views/nodes/router.ts +++ b/src/views/nodes/router.ts @@ -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 {