Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(userToken): prevent search waterfall #5512

Merged

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Feb 27, 2023

Summary

This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.

Result

if userToken is set multiple times, we make sure to not search if it's already the same as before.

This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.
@Haroenv Haroenv requested review from a team, FabienMotte and sarahdayan and removed request for a team February 27, 2023 16:38
@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 27, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cc02775:

Sandbox Source
InstantSearch.js Configuration
react-instantsearch-app Configuration
example-react-instantsearch-hooks-default-theme Configuration
example-vue-instantsearch-default-theme Configuration

Haroenv and others added 3 commits February 28, 2023 11:52
@Haroenv Haroenv merged commit 35b6439 into feat/automatic-insights Feb 28, 2023
@Haroenv Haroenv deleted the fix/automatic-insights-usertoken-loop branch February 28, 2023 16:04
Haroenv added a commit that referenced this pull request Mar 2, 2023
This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.

Co-authored-by: Fabien Motte <fabien.motte@algolia.com>
Haroenv added a commit that referenced this pull request Mar 2, 2023
This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.

Co-authored-by: Fabien Motte <fabien.motte@algolia.com>
Haroenv added a commit that referenced this pull request Mar 8, 2023
This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.

Co-authored-by: Fabien Motte <fabien.motte@algolia.com>
Haroenv added a commit that referenced this pull request Apr 18, 2023
This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.

Co-authored-by: Fabien Motte <fabien.motte@algolia.com>
Haroenv added a commit that referenced this pull request Apr 24, 2023
This makes sure when the same userToken is set multiple times, it doesn't cause multiple search requests, as could be the case if something would call setUserToken without condition.

Discovered in #5500, but should be merged separately.

Co-authored-by: Fabien Motte <fabien.motte@algolia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants