Skip to content

Commit 15f1829

Browse files
authored
fix: check if preferencesStore is defined (#21958)
1 parent b26b452 commit 15f1829

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/src/lib/utils/cast/gcast-destination.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class GCastDestination implements ICastDestination {
2727

2828
async initialize(): Promise<boolean> {
2929
const preferencesStore = get(preferences);
30-
if (!preferencesStore.cast.gCastEnabled) {
30+
if (!preferencesStore || !preferencesStore.cast.gCastEnabled) {
3131
this.isAvailable = false;
3232
return false;
3333
}

0 commit comments

Comments
 (0)