From 15f182902f0450759ec393e7fa97be87661a3c1f Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 14 Sep 2025 22:30:15 +0200 Subject: [PATCH] fix: check if preferencesStore is defined (#21958) --- web/src/lib/utils/cast/gcast-destination.svelte.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/lib/utils/cast/gcast-destination.svelte.ts b/web/src/lib/utils/cast/gcast-destination.svelte.ts index f101c504f0..8e72c71e0b 100644 --- a/web/src/lib/utils/cast/gcast-destination.svelte.ts +++ b/web/src/lib/utils/cast/gcast-destination.svelte.ts @@ -27,7 +27,7 @@ export class GCastDestination implements ICastDestination { async initialize(): Promise { const preferencesStore = get(preferences); - if (!preferencesStore.cast.gCastEnabled) { + if (!preferencesStore || !preferencesStore.cast.gCastEnabled) { this.isAvailable = false; return false; }