mirror of
https://github.com/element-hq/element-call.git
synced 2026-10-25 17:02:55 +00:00
Make recaptcha optional
This commit is contained in:
1 parent
86ccc2431e
commit
096460ecfe
1 file changed
+4
@@ -52,6 +52,10 @@ export function useRecaptcha(sitekey) {
|
||||
}, [recaptchaId, sitekey]);
|
||||
|
||||
const execute = useCallback(() => {
|
||||
if (!sitekey) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
|
||||
if (!window.grecaptcha) {
|
||||
return Promise.reject(new Error("Recaptcha not loaded"));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user