mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
store: fix no-op read receipt update detection
If the old and new times are equal, the update is a no-op.
This commit is contained in:
parent
f47d93af8a
commit
6a9a8e88f1
1 changed files with 1 additions and 1 deletions
2
store.js
2
store.js
|
@ -87,7 +87,7 @@ export class Buffer {
|
||||||
let receipts = { ...prev.receipts };
|
let receipts = { ...prev.receipts };
|
||||||
if (buf.receipts) {
|
if (buf.receipts) {
|
||||||
Object.keys(buf.receipts).forEach((k) => {
|
Object.keys(buf.receipts).forEach((k) => {
|
||||||
if (!receipts[k] || receipts[k].time <= buf.receipts[k].time) {
|
if (!receipts[k] || receipts[k].time < buf.receipts[k].time) {
|
||||||
receipts[k] = buf.receipts[k];
|
receipts[k] = buf.receipts[k];
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue