From 7d2578d9f65ac960dfcf0e171aec2bc821a794ff Mon Sep 17 00:00:00 2001 From: Quentin DECAUNES Date: Tue, 6 Aug 2019 14:29:43 +0200 Subject: [PATCH] fix: #41 Disabling auto start was causing error in some cases. --- js/methods.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/methods.js b/js/methods.js index 922d492..180d16b 100644 --- a/js/methods.js +++ b/js/methods.js @@ -627,7 +627,11 @@ function updateScheduledStartOnBoot(toBeEnabled) { if (toBeEnabled && !isEnabled) { autoLaunch.enable(); } else { - autoLaunch.disable(); + try { + autoLaunch.disable(); + } catch (error) { + console.log("WARNING: Unable to disable start on boot. Is autoLaunch already disabled?", error); + } } }); }