Skip to content

Commit

Permalink
fix bugs after refactored code
Browse files Browse the repository at this point in the history
  • Loading branch information
hryvinskyi committed Sep 24, 2019
1 parent ae2f615 commit 7b08a22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Model/ReCaptcha/Validators/Action.php
Expand Up @@ -37,7 +37,7 @@ public function validate(VerifyReCaptcha $verify, Response $response): ?string
&& $response->getAction()
&& strcasecmp($verify->getExpectedAction(), $response->getAction()) !== 0
) {
$validationErrors[] = self::E_ACTION_MISMATCH;
return self::E_ACTION_MISMATCH;
}

return null;
Expand Down
5 changes: 2 additions & 3 deletions view/base/web/js/invisible-captcha.js
Expand Up @@ -81,9 +81,8 @@ define([
tokenField.attr('data-action', action);
$(element).append(tokenField);

/** global: grecaptcha */
grecaptcha.ready(function () {
grecaptcha
window.grecaptcha.ready(function () {
window.grecaptcha
.execute(siteKey, {action: action})
.then(function (token) {
tokenField.val(token);
Expand Down

0 comments on commit 7b08a22

Please sign in to comment.