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

The bug fix for https://github.com/olivernn/lunr.js/issues/12 .