From 49288718cb628a3fe0c5d6c212322a85a0d16617 Mon Sep 17 00:00:00 2001 From: Jas Singh Date: Fri, 20 Dec 2024 20:27:50 -0800 Subject: [PATCH] Set fallback value to monitor list. (#564) --- .../menus/dashboard/shortcuts/buttons/RecordingButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/menus/dashboard/shortcuts/buttons/RecordingButton.tsx b/src/components/menus/dashboard/shortcuts/buttons/RecordingButton.tsx index ae27fcf..91dd21d 100644 --- a/src/components/menus/dashboard/shortcuts/buttons/RecordingButton.tsx +++ b/src/components/menus/dashboard/shortcuts/buttons/RecordingButton.tsx @@ -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));