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: bug when multiple domains are used in a router #134

Merged
merged 2 commits into from
May 2, 2024

Conversation

jsw800
Copy link
Contributor

@jsw800 jsw800 commented May 2, 2024

Contributor checklist

  • Bug fixes include regression tests
  • Features include unit/acceptance tests

I noticed this bug in the new router when I added a second domain to my router. It was pretty easy to track down the source of the issue so I figured I'd just submit a PR.

Basically the issue arises because :error is truthy, so if this inner Enum.find_value returns error on the first iteration (i.e. when checking for a match in the first domain), then the whole loop will return :error, even though there are more domains to check. In this scenario the intended behavior should be to return nil.

@zachdaniel zachdaniel merged commit c105c0e into ash-project:main May 2, 2024
@jsw800 jsw800 deleted the fix-multi-domain-bug branch May 2, 2024 18:05
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

@zachdaniel
Copy link
Contributor

Released in v1.0.0-rc.6

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