Skip to content

Commit

Permalink
Try another hack to fix cookie issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudmanic committed Oct 11, 2024
1 parent 0ee7585 commit 7176dce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pages/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ const Account = ({ data: fallbackData }) => {
body: JSON.stringify({ optIn: isOptedIn }),
})

// eslint-disable-next-line no-undef
document.cookie = 'tabV4OptIn=enabled; Max-Age=-99999999;'

if (response.ok) {
// Clear local storage.
localStorageMgr.removeItem(STORAGE_NEW_USER_IS_TAB_V4_BETA)
Expand All @@ -305,8 +308,6 @@ const Account = ({ data: fallbackData }) => {
// If opting out, unregister the service worker.
if (!isOptedIn) {
unregister()
// eslint-disable-next-line no-undef
document.cookie = 'tabV4OptIn=enabled; Max-Age=-99999999;'
}

// Set the "v4 beta enabled" flag to false on the user's
Expand Down

0 comments on commit 7176dce

Please sign in to comment.