Settings: make autostart toggle best-effort so it doesn't block save (dev builds)

This commit is contained in:
megaproxy 2026-05-09 01:48:03 +01:00
parent 5a6f5dd4fa
commit 97864374aa

View file

@ -44,9 +44,17 @@
if (!settings) return;
busy = true;
err = null;
// Autostart toggle is best-effort — fails on dev builds where the exe
// path is unstable (target\debug\). Don't let it block the save.
try {
if (settings.autostart) await enableAutostart();
else await disableAutostart();
} catch (e) {
console.warn("autostart toggle failed (likely dev build):", e);
}
try {
await setSettings(settings);
onClose();
} catch (e) {