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 filtering for null search term #1541

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

FoamyGuy
Copy link
Contributor

Resolves: #1540

The new search logic broke the page by assuming that downloadsSearch.searchTerm would not be undefined which was an unsafe assumption and caused the rest of the JS to stop when an error was thrown. Its now wrapped in logic that ensures it isn't undefined or null before attempting to access properties.

This also includes a fix for a seperate issue I noticed were after you search for something and then erase it from the search box you are left with the page in a very strange order that doesn't match the default sorting order. This turned out to be due to every device matching to the search term of empty string. The logic now ignores the empty string as a search term.

@dhalbert dhalbert merged commit 196fe9a into adafruit:main Nov 22, 2024
2 checks passed
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.

Filter was broken by recent search updates
2 participants