diff --git a/app/javascript/onboarding/components/FollowTags.jsx b/app/javascript/onboarding/components/FollowTags.jsx index 2e29e8a7f..ce23288bf 100644 --- a/app/javascript/onboarding/components/FollowTags.jsx +++ b/app/javascript/onboarding/components/FollowTags.jsx @@ -13,8 +13,7 @@ export class FollowTags extends Component { this.handleComplete = this.handleComplete.bind(this); const emailState = - document.body.dataset.defaultEmailOptinAllowed === 'true'; - + document.body.dataset.default_email_optin_allowed === 'true'; this.state = { allTags: [], selectedTags: [], diff --git a/app/javascript/onboarding/components/__tests__/FollowTags.test.jsx b/app/javascript/onboarding/components/__tests__/FollowTags.test.jsx index fa1558b21..c3b481692 100644 --- a/app/javascript/onboarding/components/__tests__/FollowTags.test.jsx +++ b/app/javascript/onboarding/components/__tests__/FollowTags.test.jsx @@ -235,7 +235,7 @@ describe('FollowTags', () => { describe('emailDigestPeriodic state initialization', () => { it('should initialize email_digest_periodic to true when data-default-email-optin-allowed is true', async () => { // Simulate setting data-default-email-optin-allowed to true - document.body.dataset.defaultEmailOptinAllowed = 'true'; + document.body.dataset.default_email_optin_allowed = 'true'; const { container } = renderFollowTags(); const checkbox = container.querySelector('#email_digest_periodic'); @@ -246,7 +246,7 @@ describe('FollowTags', () => { it('should initialize email_digest_periodic to false when data-default-email-optin-allowed is false', async () => { // Simulate setting data-default-email-optin-allowed to false - document.body.dataset.defaultEmailOptinAllowed = 'false'; + document.body.dataset.default_email_optin_allowed = 'false'; const { container } = renderFollowTags(); const checkbox = container.querySelector('#email_digest_periodic');