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(use-query-params): correct infinite loop when search is empty #94

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

chambo-e
Copy link
Contributor

When initial search is empty we have an infinite loop

As search is empty and our state is also empty but we compare

search !== `?${stringifiedParams}`

We call replace every 500ms for nothing

Copy link
Member

@DorianMaliszewski DorianMaliszewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@chambo-e chambo-e merged commit 7a5815e into master Mar 25, 2021
@chambo-e chambo-e deleted the fix/query-params-infinte branch March 25, 2021 10:45
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