Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(recommend): only sort items with scores #42

Merged
merged 1 commit into from
Jun 29, 2021

Conversation

francoischalifour
Copy link
Member

This fixes cases where non-scored items are re-sorted because of our sortBy logic:

image

Notice that the items with undefined as score were re-sorted.

I reversed the sortBy predicate, and now only sort items if their score are different, otherwise keep the order returned by the engine.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Small comment but looks good to me!

@francoischalifour francoischalifour merged commit ea94549 into next Jun 29, 2021
@francoischalifour francoischalifour deleted the test/items-sorting branch June 29, 2021 08:06
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.

2 participants