Skip to content

Conversation

codelizrd
Copy link

Values returned from an update function are not encoded; types not allowed by history.push({query}) are not reflected in the URL and hence they are lost.

The fix is to encode them, just like direct updates.

@pbeshai
Copy link
Owner

pbeshai commented Jul 2, 2020

Hi, thank you for this, can you please add tests to useQueryParam and useQueryParams that break before this change and pass after it?

@codelizrd
Copy link
Author

Hey Peter, I added a test to the relevant test cases; they fail using the current branch (expect something else than the returned 'null') and succeed with my change.

@pbeshai
Copy link
Owner

pbeshai commented Jul 13, 2020

Thank you! Fixes #116

@pbeshai pbeshai merged commit 8416a36 into pbeshai:master Jul 13, 2020
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.

2 participants