coresmart / persistencejs

persistence.js is an asynchronous Javascript database mapper library. You can use it in the browser, as well on the server (and you can share data models between them).
http://persistencejs.org
1.73k stars 240 forks source link

search plugin crashes on null values #113

Open davidd4 opened 11 years ago

davidd4 commented 11 years ago

when a property of an entity is registered for fulltextsearch (like Note.textIndex('name')) and the object has value 'null' for that property, flush throws an error

Uncaught TypeError: Cannot call method 'toLowerCase' of null :3000/lib/persistence/persistence.search.js:59