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
When retrieving data, we create an array of x length, where x is the limit search param. That way we avoid unnecessary dynamic allocations when adding data to the results array, but of course is causing this problem
And what would be the correct way to fix it?
Create an Array that also allows dynamic allocations (in my opinion could be fixed in this way)? Or filter the Array before the return?
I'd say... let's benchmark these operations with different array sizes. Let's see when is convenient filtering vs dynamic arrays given the docs we have
Describe the bug
Searching by a term that doesn't exist, Lyra returns
X
undefined elements.The error also occurs using
limit
,property
orexact
params.To Reproduce
Steps to reproduce the behavior:
lyra.search({ term: "whatever" })
Expected behavior
Lyra shouldn't return
X
undefined elements. Instead of that should return an empty array.Screenshots
Desktop:
The text was updated successfully, but these errors were encountered: