From 52c6e05abaa56a1f4b73dff10ba2a89b50de1d04 Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Thu, 2 May 2019 11:15:50 +0200 Subject: [PATCH] fix sorting in category-sort --- .../components/category-sort/category-sort.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts index db45bcbcc..6b07072aa 100644 --- a/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts +++ b/client/src/app/site/motions/modules/category/components/category-sort/category-sort.component.ts @@ -128,7 +128,7 @@ export class CategorySortComponent extends BaseViewComponent implements OnInit, * @param motions An array containing the new motions. */ private initializeList(motions: ViewMotion[]): void { - motions.sort((a, b) => (a.category_weight < b.category_weight ? -1 : 1)); + motions.sort((a, b) => a.category_weight - b.category_weight); this.motionsSubject.next(motions); this.motionsCopy = motions; }