Set fallback value to monitor list. (#564)
This commit is contained in:
@@ -5,7 +5,7 @@ import MenuItem from 'src/components/shared/MenuItem';
|
|||||||
import { hyprlandService } from 'src/lib/constants/services';
|
import { hyprlandService } from 'src/lib/constants/services';
|
||||||
import { isRecording } from '../helpers';
|
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-added', () => monitorList.set(hyprlandService.monitors));
|
||||||
hyprlandService.connect('monitor-removed', () => monitorList.set(hyprlandService.monitors));
|
hyprlandService.connect('monitor-removed', () => monitorList.set(hyprlandService.monitors));
|
||||||
|
|||||||
Reference in New Issue
Block a user