This occurs in a react app. Fuse is imported with Import Fuse from "fuse.js";, and I am using version 3.4.6. In a component constructor, I am using the following fuse code:
var options = {
shouldSort: true,
tokenize: true,
findAllMatches: true,
threshold: 0.6,
location: 0,
distance: 100,
maxPatternLength: 32,
minMatchCharLength: 1,
keys: [
"name",
"description"
]
};
var fuse = new Fuse(this.state.imgInd, options);
var result = fuse.search(params.query);
I get the following error upon npm start:
TypeError: n is undefined
value
node_modules/fuse.js/dist/fuse.js:188
185 | r = {},
186 | o = [];
187 |
> 188 | if ("string" == typeof n[0]) {
| ^ 189 | for (var i = 0, a = n.length; i < a; i += 1) this._analyze({
190 | key: "",
191 | value: n[i],
This occurs in a react app. Fuse is imported with
Import Fuse from "fuse.js";
, and I am using version 3.4.6. In a component constructor, I am using the following fuse code:I get the following error upon
npm start
: