You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did not see the issue filed around number. Not sure even if it is valid use case, but tokenizer fails on indexing integer (like 10). I do not have much control into what is going into update even, so if sting got change to integer following code fails with TypeError.
lunr.tokenizer = function (str) {
if (!str) return []
if (Array.isArray(str)) return str.map(function (t) { return t.toLowerCase() })
var str = str.replace(/^\s+/, '')
Solved by simply adding empty string to the str variable before calling replace().
lunr.tokenizer = function (str) {
if (!str) return []
if (Array.isArray(str)) return str.map(function (t) { return t.toLowerCase() })
var str = str+'';
str = str.replace(/^\s+/, '')
The text was updated successfully, but these errors were encountered:
Did not see the issue filed around number. Not sure even if it is valid use case, but tokenizer fails on indexing integer (like 10). I do not have much control into what is going into update even, so if sting got change to integer following code fails with TypeError.
Solved by simply adding empty string to the str variable before calling replace().
The text was updated successfully, but these errors were encountered: