olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.96k stars 548 forks source link

Uncaught TypeError: Cannot call method 'toString' of null #49

Closed jona closed 11 years ago

jona commented 11 years ago

I assigned field using: lunr.Index.prototype.field()

Then I call this function: lunr.Index.prototype.add()

And one of the fields is null, i get this error. Shouldn't it know if the field is null and exclude it from the the index?

Thanks!

olivernn commented 11 years ago

Thanks for reporting this, I've just created a new release, 0.4.3, which includes a fix for this issue.