bbonch / vue3-recaptcha2

Vue v3 component for Google reCAPTCHA v2
38 stars 9 forks source link

[Bug] render is not a function #9

Closed easyscripter closed 3 years ago

easyscripter commented 3 years ago

Describe the bug When I load the page in vue v3, I may get an error in the console stating that "window.grecaptcha.render is not a function" and i can't get token from captcha

My Environment

OC: Windows 10 Library: Vue JS v3 with class component Browser: Chrome, Edge

To Reproduce Steps to reproduce the behavior:

  1. install library with npm
  2. add script for grecaptcha
  3. reproduce example from Readme.md in class component
  4. run npm run serve and open in browser
  5. open console

Expected behavior: getting token and recaptcha icon showing

bbonch commented 3 years ago

You should not adding recaptcha script yourself.