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 nil memoization of tokens #48

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

gastronleroux
Copy link
Contributor

The problem

Memoization of tokens doesn't work if those turn out to be missing. This leads to constant token lookup when accessing it or token-dependent resources like current_devise_api_token.

The solution

Instead of checking if the instance variable is truthy, check if it's defined.


Great gem, by the way! 💯

@nejdetkadir
Copy link
Owner

thank u for your contribution 🙌🏻 @gastronleroux

@nejdetkadir nejdetkadir merged commit c562260 into nejdetkadir:main Dec 10, 2024
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