deserializeQueryParameters - TypeError: Cannot read properties of undefined (reading 'split')
volodymyr-strilets-mindcurv opened this issue Β· comments
π Current behavior
Unhandled Runtime Error
Here is the line of the error code π
Localhost console debug
Did a quick debug and found that the result
item from deserializeQueryParameters
has no params
key.
π Steps to reproduce
I have updated the libraries and this error appeared
algoliasearch: 4.20.0 > 4.21.1
instantsearch.js: 4.58.0 > 4.62.0
react-instantsearch: 7.2.0 > 7.4.1
react-instantsearch-core: 7.2.0 > 7.4.1
react-instantsearch-router-nextjs: 7.2.0 > 7.4.1
Live reproduction
π Expected behavior
Working code
Package version
react-instantsearch: 7.4.1, react-instantsearch-core: 7.4.1, react-instantsearch-router-nextjs: 7.4.1, instantsearch.js: 4.62.0, algoliasearch: 4.21.1
Operating system
No response
Browser
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Hm, that should indeed be made safe, however, how do you end up in a situation where params
isn't in the result. Is it manually filtered out by you? If there's no params
, I'm sure that the cache will not work. Safe solution would be bailing out of writing the cache altogether in that case.
Do you have a reproducible example?
@dhayab you are right, we have a custom index config where the params field was not included. After adding it, now it works.