Handle duplicate receivedAt timestamps for MESSAGE_RESET event
This commit is contained in:
parent
4f16cf595c
commit
682ac656c6
1 changed files with 2 additions and 2 deletions
|
@ -741,12 +741,12 @@ export function reducer(
|
|||
// If our metrics are a little out of date, we'll fix them up
|
||||
if (messages.length > 0) {
|
||||
const first = messages[0];
|
||||
if (first && (!oldest || first.received_at < oldest.received_at)) {
|
||||
if (first && (!oldest || first.received_at <= oldest.received_at)) {
|
||||
oldest = pick(first, ['id', 'received_at']);
|
||||
}
|
||||
|
||||
const last = messages[messages.length - 1];
|
||||
if (last && (!newest || last.received_at > newest.received_at)) {
|
||||
if (last && (!newest || last.received_at >= newest.received_at)) {
|
||||
newest = pick(last, ['id', 'received_at']);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue