Merge pull request #4655 from MaximilianKrambach/weight
fix sorting in category-sort
This commit is contained in:
commit
801010a936
@ -128,7 +128,7 @@ export class CategorySortComponent extends BaseViewComponent implements OnInit,
|
|||||||
* @param motions An array containing the new motions.
|
* @param motions An array containing the new motions.
|
||||||
*/
|
*/
|
||||||
private initializeList(motions: ViewMotion[]): void {
|
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.motionsSubject.next(motions);
|
||||||
this.motionsCopy = motions;
|
this.motionsCopy = motions;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user