Skip to content

Commit

Permalink
fix(reader-reg-block): respect newsletter subscription checkbox state (
Browse files Browse the repository at this point in the history
…#3024)

Fixes an issue where the reader registration block was not respecting the newsletter subscription checkbox state.
  • Loading branch information
chickenn00dle authored Apr 5, 2024
1 parent e267ad7 commit 02728d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/blocks/reader-registration/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function ReaderRegistrationEdit( {
};

const isListSelected = listId => {
return ! listsCheckboxes.hasOwnProperty( listId ) || listsCheckboxes[ listId ];
return listsCheckboxes.hasOwnProperty( listId ) && listsCheckboxes[ listId ];
};
const toggleListCheckbox = listId => () => {
const newListsCheckboxes = { ...listsCheckboxes };
Expand Down

0 comments on commit 02728d3

Please sign in to comment.