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 picker not displaying featured categories #25

Merged
merged 1 commit into from
Oct 21, 2023
Merged

Conversation

MrBartusek
Copy link
Owner

In recent weeks Tenor reduced the number of featured categories from 58 to 57 which revealed a critical flaw in the categories rendering code.

image

Picker has a built-in system that removes a couple of last categories when they can't be divided by column count so there are not any half-filled rows at the end. This system apparently breaks when there are no columns to remove since:

categories.slice(0, -1); // removes last 1 category
categories.slice(0, -0); // removes all categories, for some reason

This PR fixes that:

image

@MrBartusek MrBartusek added the bug Something isn't working label Oct 21, 2023
@MrBartusek MrBartusek merged commit 9f15d93 into master Oct 21, 2023
4 checks passed
@MrBartusek MrBartusek deleted the fix-categories branch October 21, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant