diff --git a/apps/portal/src/data-attributes.js b/apps/portal/src/data-attributes.js index 863f34a733..3ee351383b 100644 --- a/apps/portal/src/data-attributes.js +++ b/apps/portal/src/data-attributes.js @@ -23,7 +23,7 @@ export function formSubmitHandler({event, form, errorEl, siteUrl, submitHandler} labels.push(labelInputs[i].value); } - let newsletterInputs = event.target.querySelectorAll('input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:selected') || []; + let newsletterInputs = event.target.querySelectorAll('input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:checked') || []; for (let i = 0; i < newsletterInputs.length; ++i) { newsletters.push({id: newsletterInputs[i].value}); } diff --git a/apps/portal/src/tests/data-attributes.test.js b/apps/portal/src/tests/data-attributes.test.js index d50c5ce927..1846e0535c 100644 --- a/apps/portal/src/tests/data-attributes.test.js +++ b/apps/portal/src/tests/data-attributes.test.js @@ -63,7 +63,7 @@ function getMockData({newsletterQuerySelectorResult = null} = {}) { value: 'Gold' }]; } - if (elem === 'input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:selected' && newsletterQuerySelectorResult) { + if (elem === 'input[type=hidden][data-members-newsletter], input[type=checkbox][data-members-newsletter]:checked, input[type=radio][data-members-newsletter]:checked' && newsletterQuerySelectorResult) { return newsletterQuerySelectorResult; } }