Skip to content

conat → core-stream → getAllFromPersist: unreachable changes branch #8707

@haraldschilly

Description

@haraldschilly

In packages/conat/sync/core-stream.ts, getAllFromPersist initializes changes but never assigns to it, so the branch is never taken. Is this dead code or a missing update path?

Code (from packages/conat/sync/core-stream.ts):

let messages: StoredMessage[] = [];
let changes: (SetOperation | DeleteOperation | StoredMessage)[] = [];
// ...
this.processPersistentMessages(messages, {
  noEmit,
  noSeqCheck: true,
});
if (changes.length > 0) {
  this.processPersistentMessages(changes, {
    noEmit,
    noSeqCheck: false,
  });
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions