From 21ee24d3bf6ff5733992ac12ad3c94a1ded545cc Mon Sep 17 00:00:00 2001 From: Daniil Lohvinov Date: Wed, 13 Mar 2024 14:08:24 +0200 Subject: [PATCH] fix: run captchify without captcha [WTEL-4318] --- src/modules/reCAPTCHA-verification/scripts/reCAPTCHify.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/modules/reCAPTCHA-verification/scripts/reCAPTCHify.js b/src/modules/reCAPTCHA-verification/scripts/reCAPTCHify.js index b40b5b5..66f3936 100644 --- a/src/modules/reCAPTCHA-verification/scripts/reCAPTCHify.js +++ b/src/modules/reCAPTCHA-verification/scripts/reCAPTCHify.js @@ -1,9 +1,12 @@ +import store from '../../../app/store'; import reCAPTCHA from '../api/reCAPTCHA'; const reCAPTCHify = async (callback, { action = 'default_action', } = {}) => { try { + if (!store.state.config.captcha) return callback(); + const token = await reCAPTCHA.executeReCAPTCHA({ action }); const response = await reCAPTCHA.verifyReCAPTCHA(token); return callback(response);