Set fallback value to monitor list. (#564)

This commit is contained in:
Jas Singh
2024-12-20 20:27:50 -08:00
committed by GitHub
parent 8687c38632
commit 49288718cb

View File

@@ -5,7 +5,7 @@ import MenuItem from 'src/components/shared/MenuItem';
import { hyprlandService } from 'src/lib/constants/services';
import { isRecording } from '../helpers';
const monitorList = Variable(hyprlandService.monitors);
const monitorList = Variable(hyprlandService?.monitors || []);
hyprlandService.connect('monitor-added', () => monitorList.set(hyprlandService.monitors));
hyprlandService.connect('monitor-removed', () => monitorList.set(hyprlandService.monitors));