Skip to content

Commit

Permalink
pull out documentId check
Browse files Browse the repository at this point in the history
  • Loading branch information
WillieHabi committed Oct 14, 2024
1 parent 7a3e522 commit e6d7572
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -676,10 +676,12 @@ export class OdspDocumentDeltaConnection extends DocumentDeltaConnection {
return;
}

if (documentId !== this.documentId) {
return;
}

const filteredMsgs = msgs.filter(
(m) =>
documentId === this.documentId &&
(!m.targetClientId || m.targetClientId === this.clientId),
(m) => !m.targetClientId || m.targetClientId === this.clientId,
);

if (filteredMsgs.length > 0) {
Expand Down

0 comments on commit e6d7572

Please sign in to comment.