MihaiValentin / lunr-languages

A collection of languages stemmers and stopwords for Lunr Javascript library
Other
430 stars 163 forks source link

fix: lunr.th.js #93

Open kongvut opened 1 year ago

kongvut commented 1 year ago

Uncaught TypeError: Cannot read properties of undefined (reading 'init')

rennerg commented 10 months ago

@MihaiValentin Any plans on merging this? If so, the lunr.hi.js suffers from the same problem. Would be good to include in this PR as well

jinyoungbang commented 10 months ago

I did some testing and commenting out the .init() method seems to produce an error on demo-browser-th.html.

Screenshot 2023-10-25 at 11 57 11 AM

Locally, there seems to be no error with the test or the demo, but could it possibly be an error due to importing this library from another one?

MihaiValentin commented 10 months ago

What lunr version are you using? I'm using lunr-2.0.1.js and for me it works as expected

jinyoungbang commented 10 months ago

I'm also using lunr-2.0.1.js as well. To provide further context, this PR suggests commenting out segmenter.init(). However, when I tested this change using the demo-browser, it resulted in the error depicted in the attached screenshot above.

Regrettably, it's been approximately three months since I last utilized this library for search-related tasks, so I cannot recall precisely how that issue was triggered. Nonetheless, I opened an issue in the repository, which might offer a potential fix rather than the alterations proposed in this PR.