From 9cccf5799176e0ee85aadbfe48f047db8477881b Mon Sep 17 00:00:00 2001 From: waterplea Date: Tue, 16 Aug 2022 17:20:55 +0300 Subject: [PATCH] chore: rollback revision handling --- client/lib/store.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/lib/store.ts b/client/lib/store.ts index c24cee5..98eafe2 100644 --- a/client/lib/store.ts +++ b/client/lib/store.ts @@ -100,10 +100,8 @@ export class Store { update(update: Update): void { if (this.isRevision(update)) { - // if old or known, re-trigger the latest revision - if (update.id <= this.cache.sequence || this.stash.get(update.id)) { - this.updateSequence(this.cache.sequence) - } else { + // Handle revision if new and not known + if (update.id > this.cache.sequence && !this.stash.get(update.id)) { this.handleRevision(update) } } else {