mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
notifications: fixes
This commit is contained in:
@@ -7,7 +7,7 @@ import cloneDeep from 'lodash/cloneDeep';
|
||||
|
||||
function markNotificationAsRead (user) {
|
||||
const index = user.notifications.findIndex(notification => {
|
||||
return notification.type === 'NEW_MYSTERY_ITEMS';
|
||||
return notification && notification.type === 'NEW_MYSTERY_ITEMS';
|
||||
});
|
||||
|
||||
if (index !== -1) user.notifications.splice(index, 1);
|
||||
|
||||
Reference in New Issue
Block a user