Skip to content

Commit

Permalink
changed logic to use some function
Browse files Browse the repository at this point in the history
  • Loading branch information
aatbip committed Mar 21, 2024
1 parent 547b027 commit 5c47a19
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ export const NotificationWidget = () => {

function detectAllFalsy() {
if (appState?.appState.settings?.notifications) {
for (let i = 0; i < appState?.appState.settings?.notifications?.length; i++) {
if (appState?.appState.settings?.notifications[i].show) {
return false;
}
}
return true;
return !appState?.appState.settings?.notifications?.some(notification => notification.show)
}
}

Expand Down

0 comments on commit 5c47a19

Please sign in to comment.