fix: check if preferencesStore is defined (#21958)

This commit is contained in:
Alex 2025-09-14 22:30:15 +02:00 committed by GitHub
parent b26b452530
commit 15f182902f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,7 +27,7 @@ export class GCastDestination implements ICastDestination {
async initialize(): Promise<boolean> {
const preferencesStore = get(preferences);
if (!preferencesStore.cast.gCastEnabled) {
if (!preferencesStore || !preferencesStore.cast.gCastEnabled) {
this.isAvailable = false;
return false;
}