Skip to content

Commit

Permalink
bugfix/notifications reducer (#2741)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanmino authored Jun 3, 2021
1 parent 31f75d2 commit 542a38d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/reducers/notification/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,7 @@ const notificationReducer = (state = initialState, action) => {
};
}
case ACTIONS.REMOVE_NOT_VISIBLE_NOTIFICATIONS: {
const visibleNotifications =
notifications?.reduce(
(newNotifications, notification) => notification.isVisible && newNotifications.concat(notification),
[]
) || [];
const visibleNotifications = notifications?.filter(notification => notification.isVisible) || [];
return {
...state,
notifications: visibleNotifications
Expand Down

0 comments on commit 542a38d

Please sign in to comment.