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);