Answer the question
In order to leave comments, you need to log in
How to fix reCAPTCHA 'Cannot read property 'closest' of null' issue?
Hello, when loading reCAPTCHA on a page, 2 errors pop up in the browser console (Opera 49.0):
Uncaught TypeError: Cannot read property 'closest' of null at HTMLDocument.document.addEventListener (browser.js:277)
Code on line 277:
The site is running on localhost, and written from scratch. How can you overcome mistakes? let toHide = el.closest('div[role="dialog"]')
Answer the question
In order to leave comments, you need to log in
I have exactly the same problem, and this is only observed in Opera.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question