Skip to content

Commit

Permalink
EULAC-254 | Fixed null checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
keeteean committed Feb 27, 2024
1 parent 404247f commit 362b1e6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions build/cookieconsent.js
Original file line number Diff line number Diff line change
Expand Up @@ -1515,8 +1515,8 @@ var Interface = /*#__PURE__*/function () {
buttonSettings.setAttribute('aria-hidden', 'false');
buttonConsentGive.setAttribute('tabindex', '0');
buttonConsentGive.setAttribute('aria-hidden', 'false');
(_ref = buttonConsentDecline && buttonConsentDecline.length > 0) !== null && _ref !== void 0 ? _ref : buttonConsentDecline.setAttribute('tabindex', '0');
(_ref2 = buttonConsentDecline && buttonConsentDecline.length > 0) !== null && _ref2 !== void 0 ? _ref2 : buttonConsentDecline.setAttribute('aria-hidden', 'false');
(_ref = buttonConsentDecline !== null) !== null && _ref !== void 0 ? _ref : buttonConsentDecline.setAttribute('tabindex', '0');
(_ref2 = buttonConsentDecline !== null) !== null && _ref2 !== void 0 ? _ref2 : buttonConsentDecline.setAttribute('aria-hidden', 'false');
}, window.CookieConsent.config.barTimeout);
}
});
Expand Down Expand Up @@ -1573,8 +1573,8 @@ var Interface = /*#__PURE__*/function () {
button.setAttribute('aria-hidden', 'true');
buttonSettings.setAttribute('tabindex', '-1');
buttonSettings.setAttribute('aria-hidden', 'true');
(_ref5 = buttonConsentDecline && buttonConsentDecline.length > 0) !== null && _ref5 !== void 0 ? _ref5 : buttonConsentDecline.setAttribute('tabindex', '-1');
(_ref6 = buttonConsentDecline && buttonConsentDecline.length > 0) !== null && _ref6 !== void 0 ? _ref6 : buttonConsentDecline.setAttribute('aria-hidden', 'true');
(_ref5 = buttonConsentDecline !== null) !== null && _ref5 !== void 0 ? _ref5 : buttonConsentDecline.setAttribute('tabindex', '-1');
(_ref6 = buttonConsentDecline !== null) !== null && _ref6 !== void 0 ? _ref6 : buttonConsentDecline.setAttribute('aria-hidden', 'true');
focusTarget.focus();
modalOpen = false;

Expand Down Expand Up @@ -1769,8 +1769,8 @@ var Interface = /*#__PURE__*/function () {
buttonSettings.setAttribute('aria-hidden', 'true');
buttonConsentGive.setAttribute('tabindex', '-1');
buttonConsentGive.setAttribute('aria-hidden', 'true');
(_ref3 = buttonConsentDecline && buttonConsentDecline.length > 0) !== null && _ref3 !== void 0 ? _ref3 : buttonConsentDecline.setAttribute('tabindex', '-1');
(_ref4 = buttonConsentDecline && buttonConsentDecline.length > 0) !== null && _ref4 !== void 0 ? _ref4 : buttonConsentDecline.setAttribute('aria-hidden', 'true');
(_ref3 = buttonConsentDecline !== null) !== null && _ref3 !== void 0 ? _ref3 : buttonConsentDecline.setAttribute('tabindex', '-1');
(_ref4 = buttonConsentDecline !== null) !== null && _ref4 !== void 0 ? _ref4 : buttonConsentDecline.setAttribute('aria-hidden', 'true');
focusTarget.focus();
modalOpen = false;
});
Expand Down
2 changes: 1 addition & 1 deletion build/cookieconsent.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs_src/src/assets/js/cookieconsent.min.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/lib/Interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ export default class Interface {
buttonSettings.setAttribute('aria-hidden', 'false');
buttonConsentGive.setAttribute('tabindex', '0');
buttonConsentGive.setAttribute('aria-hidden', 'false');
(buttonConsentDecline && buttonConsentDecline.length > 0) ?? buttonConsentDecline.setAttribute('tabindex', '0');
(buttonConsentDecline && buttonConsentDecline.length > 0) ?? buttonConsentDecline.setAttribute('aria-hidden', 'false');
buttonConsentDecline !== null ?? buttonConsentDecline.setAttribute('tabindex', '0');
buttonConsentDecline !== null ?? buttonConsentDecline.setAttribute('aria-hidden', 'false');
}, window.CookieConsent.config.barTimeout);
}
});
Expand Down Expand Up @@ -316,8 +316,8 @@ export default class Interface {
button.setAttribute('aria-hidden', 'true');
buttonSettings.setAttribute('tabindex', '-1');
buttonSettings.setAttribute('aria-hidden', 'true');
(buttonConsentDecline && buttonConsentDecline.length > 0) ?? buttonConsentDecline.setAttribute('tabindex', '-1');
(buttonConsentDecline && buttonConsentDecline.length > 0) ?? buttonConsentDecline.setAttribute('aria-hidden', 'true');
buttonConsentDecline !== null ?? buttonConsentDecline.setAttribute('tabindex', '-1');
buttonConsentDecline !== null ?? buttonConsentDecline.setAttribute('aria-hidden', 'true');
focusTarget.focus();
modalOpen = false;

Expand Down Expand Up @@ -481,8 +481,8 @@ export default class Interface {
buttonSettings.setAttribute('aria-hidden', 'true');
buttonConsentGive.setAttribute('tabindex', '-1');
buttonConsentGive.setAttribute('aria-hidden', 'true');
(buttonConsentDecline && buttonConsentDecline.length > 0) ?? buttonConsentDecline.setAttribute('tabindex', '-1');
(buttonConsentDecline && buttonConsentDecline.length > 0) ?? buttonConsentDecline.setAttribute('aria-hidden', 'true');
buttonConsentDecline !== null ?? buttonConsentDecline.setAttribute('tabindex', '-1');
buttonConsentDecline !== null ?? buttonConsentDecline.setAttribute('aria-hidden', 'true');
focusTarget.focus();
modalOpen = false;
});
Expand Down

0 comments on commit 362b1e6

Please sign in to comment.