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

lunr.Index.prototype.idf() seems to fail when the term is an all-lowercase property of Object.prototype. #64

Closed
gitgrimbo opened this issue Jan 21, 2014 · 1 comment

Comments

@gitgrimbo
Copy link

For example, an index with "constructor" or "UNDERUNDERprotoUNDERUNDER" terms in it will cause idf() to return the Object.prototype property of the same name.

(UNDER is _. Used here to avoid GFM stripping the _s and turning the property bold)

Because the returned property of Object.prototype is not a number, the subsequent calculations return NaN.

Pull request with tests to follow.

@olivernn
Copy link
Owner

olivernn commented Apr 9, 2015

I believe this is now fixed

Please re-open if you continue to see any problems.

@olivernn olivernn closed this as completed Apr 9, 2015
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

No branches or pull requests

2 participants