MM-54887 Fix category order being reversed after moving a channel (#7628)

This commit is contained in:
Harrison Healey 2023-10-24 16:21:14 -04:00 committed by GitHub
parent f30384eb22
commit 1a031cdbbe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,7 +120,7 @@ export default class CategoryModel extends Model implements CategoryInterface {
toCategoryWithChannels = async (): Promise<CategoryWithChannels> => {
const categoryChannels = await this.categoryChannels.fetch();
const orderedChannelIds = categoryChannels.sort((a, b) => {
return b.sortOrder - a.sortOrder;
return a.sortOrder - b.sortOrder;
}).map((cc) => cc.channelId);
return {