diff --git a/packages/extension/src/view/popup/stateProviders/syncCookieStore/index.tsx b/packages/extension/src/view/popup/stateProviders/syncCookieStore/index.tsx index 26189a98c..31a26baf9 100644 --- a/packages/extension/src/view/popup/stateProviders/syncCookieStore/index.tsx +++ b/packages/extension/src/view/popup/stateProviders/syncCookieStore/index.tsx @@ -241,11 +241,10 @@ export const Provider = ({ children }: PropsWithChildren) => { const sessionStoreChangeListener = useCallback( (changes: { [key: string]: chrome.storage.StorageChange }) => { - if ( - Object.keys(changes).includes('allowedNumberOfTabs') && - Object.keys(changes.allowedNumberOfTabs).includes('newValue') - ) { - setAllowedNumberOfTabs(changes?.allowedNumberOfTabs?.newValue); + if (changes?.['allowedNumberOfTabs']?.['newValue']) { + setAllowedNumberOfTabsForSettingsDisplay( + changes?.allowedNumberOfTabs?.newValue + ); setSettingsChanged(true); } @@ -253,7 +252,7 @@ export const Provider = ({ children }: PropsWithChildren) => { Object.keys(changes).includes('isUsingCDP') && Object.keys(changes.isUsingCDP).includes('newValue') ) { - setIsUsingCDP(changes?.isUsingCDP?.newValue); + setIsUsingCDPForSettingsDisplay(changes?.isUsingCDP?.newValue); setSettingsChanged(true); } },