Skip to content

Commit a31d701

Browse files
Static tests fix.
1 parent 2c2008b commit a31d701

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

ReCaptchaFrontendUi/view/frontend/web/js/nonInlineReCaptchaRenderer.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,28 @@ define([
3333

3434
/**
3535
* Show additional reCaptcha instance if any other should be visible, otherwise hide it.
36+
*
37+
* @private
3638
*/
3739
resolveVisibility: function () {
3840
reCaptchaEntities.some(
39-
(entity) => {
40-
return entity.is(":visible")
41+
/**
42+
* Check if reCaptcha instance is visible.
43+
*
44+
* @param {jQuery} entity
45+
* @returns {Boolean}
46+
*/
47+
function (entity) {
48+
return entity.is(':visible') &&
4149
// 900 is some magic z-index value of modal popups.
42-
&& (entity.closest("[data-role='modal']").length === 0 || entity.zIndex() > 900)
50+
(entity.closest('[data-role=\'modal\']').length === 0 || entity.zIndex() > 900)
4351
}) ? rendererReCaptcha.show() : rendererReCaptcha.hide();
4452
},
4553

4654
/**
4755
* Initialize additional reCaptcha instance.
56+
*
57+
* @private
4858
*/
4959
init: function () {
5060
rendererReCaptcha = $('<div/>', {

ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ define(
1212
'ko',
1313
'Magento_ReCaptchaFrontendUi/js/registry',
1414
'Magento_ReCaptchaFrontendUi/js/reCaptchaScriptLoader',
15-
'Magento_ReCaptchaFrontendUi/js/nonInlineReCaptchaRenderer',
15+
'Magento_ReCaptchaFrontendUi/js/nonInlineReCaptchaRenderer'
1616
],
17-
function (Component, $, ko, registry, reCaptchaLoader,nonInlineReCaptchaRenderer) {
17+
function (Component, $, ko, registry, reCaptchaLoader, nonInlineReCaptchaRenderer) {
1818
'use strict';
1919

2020
return Component.extend({

0 commit comments

Comments
 (0)