fix: 🐛
This commit is contained in:
parent
e9eb897f36
commit
8582f28315
1 changed files with 4 additions and 4 deletions
|
|
@ -201,9 +201,6 @@ class ClientService extends EventTarget {
|
|||
if (_eosed) {
|
||||
eosedCount++
|
||||
}
|
||||
if (eosedCount < threshold) {
|
||||
return
|
||||
}
|
||||
|
||||
_events.forEach((evt) => {
|
||||
if (eventIdSet.has(evt.id)) return
|
||||
|
|
@ -212,7 +209,10 @@ class ClientService extends EventTarget {
|
|||
})
|
||||
events = events.sort((a, b) => b.created_at - a.created_at).slice(0, filter.limit)
|
||||
eventIdSet = new Set(events.map((evt) => evt.id))
|
||||
|
||||
if (eosedCount >= threshold) {
|
||||
onEvents(events, eosedCount >= requestCount)
|
||||
}
|
||||
},
|
||||
onNew: (evt) => {
|
||||
if (newEventIdSet.has(evt.id)) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue