From 631b7c2fed691a26099ac9ff674c6ef87a4ed91e Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Tue, 9 Jan 2024 20:01:18 +0100 Subject: [PATCH] Fix feed sorting (#3155) Closes #2915 --- web/src/utils/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/utils/helpers.ts b/web/src/utils/helpers.ts index a61e14b70a..ac43ea6a10 100644 --- a/web/src/utils/helpers.ts +++ b/web/src/utils/helpers.ts @@ -63,7 +63,7 @@ export function comparePipelines(a: Pipeline, b: Pipeline): number { export function comparePipelinesWithStatus(a: Pipeline, b: Pipeline): number { const bPriority = ['pending', 'running', 'started'].includes(b.status) ? 1 : 0; const aPriority = ['pending', 'running', 'started'].includes(a.status) ? 1 : 0; - return bPriority - aPriority; + return bPriority - aPriority || comparePipelines(a, b); } export function isPipelineActive(pipeline: Pipeline): boolean {