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 {
autoLaunch.disable(); try {
autoLaunch.disable();
} catch (error) {
console.log("WARNING: Unable to disable start on boot. Is autoLaunch already disabled?", error);
}
} }
}); });
} }