mirror of
https://codeberg.org/emersion/gamja.git
synced 2024-11-14 19:05:01 -05:00
store: add note about comparison in Buffer.put
This commit is contained in:
parent
2ac7be6218
commit
a3eec9a351
1 changed files with 2 additions and 0 deletions
2
store.js
2
store.js
|
@ -87,6 +87,8 @@ export class Buffer {
|
|||
let receipts = { ...prev.receipts };
|
||||
if (buf.receipts) {
|
||||
Object.keys(buf.receipts).forEach((k) => {
|
||||
// Use a not-equals comparison here so that no-op receipt
|
||||
// changes are correctly handled
|
||||
if (!receipts[k] || receipts[k].time < buf.receipts[k].time) {
|
||||
receipts[k] = buf.receipts[k];
|
||||
updated = true;
|
||||
|
|
Loading…
Reference in a new issue