Skip to content

Comments

Pioneer: Video sorting fix#1204

Merged
mnaamani merged 1 commit intoJoystream:masterfrom
Lezek123:video-sort-hotfix
Sep 3, 2020
Merged

Pioneer: Video sorting fix#1204
mnaamani merged 1 commit intoJoystream:masterfrom
Lezek123:video-sort-hotfix

Conversation

@Lezek123
Copy link
Contributor

Fixes #1203

@Lezek123 Lezek123 requested a review from mnaamani August 31, 2020 14:45
let videos = (await this.allVideos())
.filter(x => channelId && channelId.eq(x.channelId) && (additionalFilter || (() => true))(x))
.sort(x => -1 * x.id);
.sort((a, b) => b.id - a.id);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, x => -1 * x.id doesn't seem to make any sense at all :)

@mnaamani mnaamani merged commit 1cfeed8 into Joystream:master Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pioneer: Nondeterministic video sorting

2 participants