Open jinyoungbang opened 1 year ago
When initializing lunr.th.js, the following error occurs: TypeError: Cannot read properties of undefined (reading 'init').
lunr.th.js
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:
wordcut.js
init()
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
lunr.hi.js
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 theinit()
function gets called, as shown in this block:Personally, I think that the
wordcut.js
is not getting imported into the respective languages and with absolute import, no error seems to occur:Would love to get some advice or feedback if this would be the right approach to solve the issue!