fix: #41 Disabling auto start was causing error in some cases.

This commit is contained in:
Quentin DECAUNES 2019-08-06 14:29:43 +02:00 committed by Quentin “Storm1er” Decaunes
parent dbf6702873
commit 7d2578d9f6

View File

@ -627,7 +627,11 @@ function updateScheduledStartOnBoot(toBeEnabled) {
if (toBeEnabled && !isEnabled) { if (toBeEnabled && !isEnabled) {
autoLaunch.enable(); autoLaunch.enable();
} else { } else {
try {
autoLaunch.disable(); autoLaunch.disable();
} catch (error) {
console.log("WARNING: Unable to disable start on boot. Is autoLaunch already disabled?", error);
}
} }
}); });
} }