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

update findBestHint function #813

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

migliori
Copy link

Hello,

When hitting the backward key in the search input I got a "Cannot read property 'toLowerCase' of undefined" error.

I solved the issue with editing the findBestHint function when suggestion.value doesn't exist.

Thanks

solve the "Cannot read property 'toLowerCase' of undefined" issue with findBestHint function when  suggestion.value doesn't exist
if (foundMatch) {
bestMatch = suggestion;
var foundMatch = false;
if (suggestion.value !== undefined) {
Copy link
Member

Choose a reason for hiding this comment

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

Why would suggestion value be undefined?

Copy link
Author

Choose a reason for hiding this comment

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

I don't know exactly, I didn't try to understand why, but it happens when hitting the backward key and causes the error.

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