Skip to content

Commit

Permalink
Fix condition of the settings being shown. (#554)
Browse files Browse the repository at this point in the history
  • Loading branch information
amovar18 authored Mar 13, 2024
1 parent 20cc714 commit c8cc7df
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,19 +241,18 @@ 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);
}

if (
Object.keys(changes).includes('isUsingCDP') &&
Object.keys(changes.isUsingCDP).includes('newValue')
) {
setIsUsingCDP(changes?.isUsingCDP?.newValue);
setIsUsingCDPForSettingsDisplay(changes?.isUsingCDP?.newValue);
setSettingsChanged(true);
}
},
Expand Down

0 comments on commit c8cc7df

Please sign in to comment.