Skip to content

Commit

Permalink
fix: cleanup from a redundant condition
Browse files Browse the repository at this point in the history
  • Loading branch information
mirovladimitrovski committed Jun 8, 2023
1 parent 5f5d259 commit 9106f05
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/Account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const Account = ({ panelClassName, panelHeaderClassName, canUpdateEmail = true }
const nonTerms: Consent<ConsentFieldVariants>[] = [];

publisherConsents?.forEach((consent) => {
if (!Object.hasOwn(consent, 'type') || consent.type === ConsentFieldVariants.CHECKBOX) {
if (consent.type === ConsentFieldVariants.CHECKBOX) {
terms.push(consent);
} else {
nonTerms.push(consent);
Expand Down
38 changes: 19 additions & 19 deletions src/components/Account/__snapshots__/Account.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -131,29 +131,29 @@ exports[`<Account> > renders and matches snapshot 1`] = `
account.terms_and_tracking
</h3>
</div>
<div
class="_flexBox_1c1c63"
/>
<div
class="_controls_1c1c63"
/>
</div>
<div
class="panel-class"
>
<div
class="header-class"
>
<h3>
account.other_registration_details
</h3>
</div>
<div
class="_flexBox_1c1c63"
>
<div
class="_checkbox_531f07"
>
<div
class="_row_531f07"
>
<input
id="check-box_1235_consentsValues.marketing"
name="consentsValues.marketing"
type="checkbox"
value=""
/>
<label
for="check-box_1235_consentsValues.marketing"
>
Receive Marketing Emails
</label>
</div>
</div>
class="_customFields_c968f7"
/>
</div>
<div
class="_controls_1c1c63"
Expand Down

0 comments on commit 9106f05

Please sign in to comment.