mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 06:58:06 +01:00
[Glitch] Add missing null handling in notification reducer
Port 2f3ac14a43
to glitch-soc
This commit is contained in:
parent
4eba8c50c3
commit
5d16fd3f28
1 changed files with 2 additions and 2 deletions
|
@ -92,7 +92,7 @@ const expandNormalizedNotifications = (state, notifications, next) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterNotifications = (state, relationship) => {
|
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) => {
|
const updateTop = (state, top) => {
|
||||||
|
@ -104,7 +104,7 @@ const updateTop = (state, top) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteByStatus = (state, statusId) => {
|
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) => {
|
const markForDelete = (state, notificationId, yes) => {
|
||||||
|
|
Loading…
Reference in a new issue