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

bug fix for lunr.index.search throws TypeError when searching for "javas... #13

Closed
wants to merge 1 commit into from

Conversation

makoto
Copy link

@makoto makoto commented Mar 9, 2013

The bug fix for #12 .

@mpneuried
Copy link

I run into the same problem.
If you try to search for more than one word and the first word will not create a result you get an error like:

TypeError: invalid 'in' operand root
has(token="", root=1) in lunr.js (1185)

My Solution in lunr.js (1180) is

  var root = typeof(root) != "object" ? this.root : root,

This takes care of the var scope

@olivernn
Copy link
Owner

The problem was actually a little further up than the token store, where the error was being thrown. I've pushed a new version with a fix. Thanks

@olivernn olivernn closed this Mar 13, 2013
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.

3 participants