fix infinity case
This commit is contained in:
parent
e36548579f
commit
92685e37b6
|
@ -52,10 +52,12 @@ const fetchAndUpdate = ({ store, credentials, older = false, since }) => {
|
|||
const unreadNotifsIds = notifications.filter(n => !n.seen).map(n => n.id)
|
||||
if (readNotifsIds.length > 0 && readNotifsIds.length > 0) {
|
||||
const minId = Math.min(...unreadNotifsIds) // Oldest known unread notification
|
||||
if (minId !== Infinity) {
|
||||
args.since = false // Don't use since_id since it sorta conflicts with min_id
|
||||
args.minId = minId - 1 // go beyond
|
||||
fetchNotifications({ store, args, older })
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue