From 454dc4a93ba2d2ade1b6f9a3974890b08ed78847 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Thu, 20 Nov 2025 16:07:35 -0500 Subject: [PATCH] refactor: simplify localHistory initialization by removing intermediate constant --- packages/sds/src/message_channel/message_channel.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/sds/src/message_channel/message_channel.ts b/packages/sds/src/message_channel/message_channel.ts index fa01083869..e55ac045d4 100644 --- a/packages/sds/src/message_channel/message_channel.ts +++ b/packages/sds/src/message_channel/message_channel.ts @@ -117,9 +117,8 @@ export class MessageChannel extends TypedEventEmitter { this.outgoingBuffer = []; this.possibleAcks = new Map(); this.incomingBuffer = []; - const resolvedLocalHistory = + this.localHistory = localHistory ?? new PersistentHistory({ channelId: this.channelId }); - this.localHistory = resolvedLocalHistory; this.causalHistorySize = options.causalHistorySize ?? DEFAULT_CAUSAL_HISTORY_SIZE; // TODO: this should be determined based on the bloom filter parameters and number of hashes