From 2cee503ffd757a6cf4a6bfa5852007aa06c0bab5 Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Fri, 29 Dec 2023 13:16:59 +0100 Subject: [PATCH] be a bit more forgiving for invalid command --- electron/full-screen-blocker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/full-screen-blocker.ts b/electron/full-screen-blocker.ts index 5ee8aa75fc..61ccb7072d 100644 --- a/electron/full-screen-blocker.ts +++ b/electron/full-screen-blocker.ts @@ -24,7 +24,7 @@ export const initFullScreenBlocker = (IS_DEV: boolean): void => { skipTaskbar: true, frame: false, }); - const randomImgUrl = takeABreakCfg.motivationalImgs.length + const randomImgUrl = takeABreakCfg.motivationalImgs?.length ? takeABreakCfg.motivationalImgs[ Math.floor(Math.random() * takeABreakCfg.motivationalImgs.length) ]