[Glitch] Add missing null handling in notification reducer
Port 9487e8a4c0
to glitch-soc
lolsob-rspec
parent
7096611df6
commit
f4a929a74a
|
@ -92,7 +92,7 @@ const expandNormalizedNotifications = (state, notifications, next) => {
|
|||
};
|
||||
|
||||
const filterNotifications = (state, relationship) => {
|
||||
return state.update('items', list => list.filterNot(item => item.get('account') === relationship.id));
|
||||
return state.update('items', list => list.filterNot(item => item !== null && item.get('account') === relationship.id));
|
||||
};
|
||||
|
||||
const updateTop = (state, top) => {
|
||||
|
@ -104,7 +104,7 @@ const updateTop = (state, top) => {
|
|||
};
|
||||
|
||||
const deleteByStatus = (state, statusId) => {
|
||||
return state.update('items', list => list.filterNot(item => item.get('status') === statusId));
|
||||
return state.update('items', list => list.filterNot(item => item !== null && item.get('status') === statusId));
|
||||
};
|
||||
|
||||
const markForDelete = (state, notificationId, yes) => {
|
||||
|
|
Loading…
Reference in New Issue