Fix feed sorting (#3155)

Closes #2915
This commit is contained in:
qwerty287 2024-01-09 20:01:18 +01:00 committed by GitHub
parent 7786028b4a
commit 631b7c2fed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {