Skip to content

Conversation

0xjcf
Copy link
Contributor

@0xjcf 0xjcf commented Jul 1, 2025

Fixes React Query error 'Query data cannot be undefined' when useAuthorize hook is called with the region: false parameter, changed the getRegion function to return null instead of undefined to comply with React Query requirements.

Fixes #1584

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. Run yarn in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (yarn test). Tip: yarn test --watch TestName is helpful in development.
  5. Make sure your code passed the conventional commits check. Read more about conventional commits

…region is false

Fixes React Query error 'Query data cannot be undefined' when useAuthorize
hook is called with region: false parameter. Changed getRegion function to
return null instead of undefined to comply with React Query requirements.

Fixes Availity#1584
@0xjcf 0xjcf self-assigned this Jul 1, 2025
@0xjcf 0xjcf added the bug label Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

useAuthorize hook throws React Query error when region: false - getRegion returns undefined
2 participants