From 7176dcef9b053aa972c956232bf1eecae8017044 Mon Sep 17 00:00:00 2001 From: Spicer Matthews Date: Thu, 10 Oct 2024 23:54:26 -0700 Subject: [PATCH] Try another hack to fix cookie issue. --- src/pages/account.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/account.js b/src/pages/account.js index 0cf3cf6b..2b242560 100644 --- a/src/pages/account.js +++ b/src/pages/account.js @@ -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) @@ -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