Autocomplete : getWidgetRenderState giving me initial null result
DonBenci opened this issue Β· comments
π Current behavior
When typing on the search bar, I'm getting an error in the console as soon as it returns a result. However I get a null result pass thru in the getWidgetRenderState function in the vue-instantsearch.js file.
attaching screenshots below of the error and the file.
This is the scopedResult object
as you can see, it's null. That is getting caught in my e2e.
π Expected behavior
to not get the error when typing
I'm wondering if the scopedResults should be filtered by results first, only the ones that's not null should be mapped.
I haven't tested this though.
something like this:
var indices = scopedResults.filter((scopedResult)=>scopedResult.result != null).map(function(scopedResult) {
scopedResult.results.hits = escapeHTML ? escapeHits(scopedResult.results.hits) : scopedResult.results.hits;
....
I'm new to the Algolia instasearch ui lib, I've been reading for the past 2 days, I might be missing something. if this is not a bug I hope someone could lead me to the right direction π
Package version
@nuxt/algolia@latest
Operating system
No response
Browser
No response
Code of Conduct
- I agree to follow this project's Code of Conduct