[Glitch] Enable ESLlint no-case-declarations

Port f91f077985 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Nick Schonning
2024-10-01 12:26:30 -04:00
committed by Claire
parent af39ac6edc
commit 61a0c58dee
6 changed files with 16 additions and 8 deletions

View File

@@ -369,9 +369,10 @@ export default function notifications(state = initialState, action) {
}
return markAllForDelete(st, action.yes);
case NOTIFICATIONS_MARK_AS_READ:
case NOTIFICATIONS_MARK_AS_READ: {
const lastNotification = state.get('items').find(item => item !== null);
return lastNotification ? recountUnread(state, lastNotification.get('id')) : state;
}
default:
return state;