-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Suggestion text needs to be a string #24526
Conversation
Just noticed that you can get duplicates in the recent searches which causes another complaint from React. This happens if you have a search that is an object in your history and then type in the same string. You now have two items in the history, one is an object, the other is a string, but after toUser(), they are both the same string. I hope that makes sense. |
the same query could both exist in the persisted log, resulting in identical strings after toUser runs
Great catch, added deduplication as well |
💚 Build Succeeded |
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah that's pretty silly, and an easy fix, went ahead and changed it. |
* suggestion text needs to be a string * deduplicate after calling toUser since a string and object version of the same query could both exist in the persisted log, resulting in identical strings after toUser runs * don't put empty strings in the recent search history
* suggestion text needs to be a string * deduplicate after calling toUser since a string and object version of the same query could both exist in the persisted log, resulting in identical strings after toUser runs * don't put empty strings in the recent search history
Forgot to mention, that previous failure was unrelated to this PR and the build before that passed. |
💚 Build Succeeded |
Addresses the issue @trevan brought up here