MihaiValentin/lunr-languages

Error when initializing `lunr.th.js`

jinyoungbang opened this issue · 1 comments

When initializing lunr.th.js, the following error occurs: TypeError: Cannot read properties of undefined (reading 'init').

This seems to be happening to languages that try to use wordcut.js, where the error occurs as the init() function gets called, as shown in this block:

var segmenter = lunr.wordcut;
segmenter.init();

Personally, I think that the wordcut.js is not getting imported into the respective languages and with absolute import, no error seems to occur:

lunr.wordcut = require('./wordcut');
var segmenter = lunr.wordcut;
segmenter.init();

Would love to get some advice or feedback if this would be the right approach to solve the issue!

I'm having the same problem with lunr.hi.js