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

Provider loaded #38

Closed
wants to merge 2 commits into from
Closed

Conversation

alreece45
Copy link
Contributor

fix(recaptcha provider): detect if library is already loaded

* add check for `grecaptcha` variable if the script tag already exists
fix(recaptcha v3 component): correct loaded check

* add loaded prop to state
* update componentDidUpdate() to use the new state prop
* update componentDidMount() to only run if loaded

fixes #37

* add check for `grecaptcha` variable if the script tag already exists
* add loaded prop to state
* update componentDidUpdate() to use the new state prop
* update componentDidMount() to only run if loaded
@antokara
Copy link
Owner

hello @alreece45 !

Thank you for another great bug report.

I fixed the issue in e72f95b with a very similar approach to your solution. I also made sure the code is tested to avoid future regressions. Lastly, I added a "Toggle Provider" button in the "dev" project to test this use case.

Feel free to file more bug reports if you find any issues.
Thank again!

@antokara antokara closed this Jun 14, 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.

ReCaptchas do not run when ReCaptchaProvider is remounted
2 participants