Merge pull request #4655 from MaximilianKrambach/weight

fix sorting in category-sort
This commit is contained in:
Emanuel Schütze 2019-05-06 16:25:36 +02:00 committed by GitHub
commit 801010a936
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}