mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-26 10:21:53 +00:00
permit futuristic revisions
This commit is contained in:
@@ -152,12 +152,6 @@ export class PatchDB<T extends { [key: string]: any }> {
|
|||||||
if (this.isRevision(update)) {
|
if (this.isRevision(update)) {
|
||||||
const expected = cache.sequence + 1
|
const expected = cache.sequence + 1
|
||||||
if (update.id < expected) return
|
if (update.id < expected) return
|
||||||
if (update.id > expected) {
|
|
||||||
return console.error(
|
|
||||||
// unreachable
|
|
||||||
`Received futuristic revision. Expected ${expected}, got ${update.id}`,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
this.handleRevision(update, cache)
|
this.handleRevision(update, cache)
|
||||||
} else {
|
} else {
|
||||||
this.handleDump(update, cache)
|
this.handleDump(update, cache)
|
||||||
|
|||||||
Reference in New Issue
Block a user