Failing example in readme.md
cristianvasquez opened this issue · comments
Cristian Vasquez commented
Hi,
I'm testing the library using the example of README.md,
but it fails:
At: node_modules/fastbitset/FastBitSet.js:488
const count = Math.max(this.words.length, otherbitmap.words.length);
TypeError: Cannot read properties of undefined (reading 'words')
Mateusz commented
Hey @cristianvasquez, thanks for info. It's fixed now
carolineboeykens commented
@cigolpl, Do you know what was wrong here? We are getting the same error so maybe there is something wrong with our data but I can't figure out what went wrong.
Mateusz commented
@carolineboeykens, in that case:
const movies = itemsjs.search({
per_page: 1,
sort: 'name_asc',
// full text search
// query: 'forrest gump',
filters: {
tags: ['1980s']
}
})
the tag: "1980s" was not present in a JSON.
Itemsjs should handle it and i.e. throw Error with "The filter value does not exist" so it would be clear