Refactor Notification BIG
This commit is contained in:
parent
015bb3b3eb
commit
0394a77e49
@ -504,8 +504,8 @@ export class LeantimeAdapter implements NotificationAdapter {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Process notifications in batches
|
// Process notifications in batches
|
||||||
const notificationIds = unreadNotifications
|
const notificationIds: number[] = unreadNotifications
|
||||||
.map((n: { id: number | string; sourceId: string }) => {
|
.map((n: { id: number | string; sourceId: string }): number | null => {
|
||||||
const id = typeof n.id === 'number' ? n.id : parseInt(String(n.id || n.sourceId));
|
const id = typeof n.id === 'number' ? n.id : parseInt(String(n.id || n.sourceId));
|
||||||
return isNaN(id) ? null : id;
|
return isNaN(id) ? null : id;
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user