-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Fix useLogoutAccessDenied
should not throw when no redirectTo
is provided
#10763
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Would you mind adding some too?
|
Oups, sorry for the typo... Can you add some unit tests as well? |
…er_false_and_without_redirectTo_causes_an_error' of github.com:carloshv93/react-admin into hotfix/10172-reject_promise_in_checkError_with_logoutUser_false_and_without_redirectTo_causes_an_error
Unit test added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding a test!
useLogoutAccessDenied
should not throw when no redirectTo
is provided
Problem
Undefined redirectTo values throws error
Fix #10172
Supersedes #10177
Solution
Create a handleRedirect function to properly handle either valid URL or undefined URLS
How To Test
Steps to reproduce
Follow steps from #10177
Additional Checks
master
for a bugfix or a documentation fix, ornext
for a featureAlso, please make sure to read the contributing guidelines.
Evidence