From 11b8a0ff971817c107ba84364bf381267ae2ab11 Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Fri, 29 May 2026 19:15:27 +0100 Subject: [PATCH] Fix bad snapshot initialisation --- packages/lib/src/subscriptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lib/src/subscriptions.ts b/packages/lib/src/subscriptions.ts index 8d8d5120..d6761dd9 100644 --- a/packages/lib/src/subscriptions.ts +++ b/packages/lib/src/subscriptions.ts @@ -401,7 +401,7 @@ export class EventSubscriber { /** True if this subscriber is currently synced with the source */ synced = false; /** Repeat calls to getSnapshot will return the same readonly copy unless values has updated */ - private _snapshot: readonly [S, boolean] = [null as S, false]; + private _snapshot: readonly [S, boolean] = [this.makeSnapshot(), false]; private _snapshotLastUpdatedMs = -1; /** Callbacks will be called when an event is received or the synced state changes */ private _callbacks = new Array>();