Skip to content

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