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 our metrics are a little out of date, we'll fix them up
|
||||||
if (messages.length > 0) {
|
if (messages.length > 0) {
|
||||||
const first = messages[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']);
|
oldest = pick(first, ['id', 'received_at']);
|
||||||
}
|
}
|
||||||
|
|
||||||
const last = messages[messages.length - 1];
|
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']);
|
newest = pick(last, ['id', 'received_at']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue