Fix never released activating_source
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
nemunaire 2024-12-17 21:15:49 +01:00
parent 24342f5062
commit 0fd9baaf71

View File

@ -4,12 +4,15 @@
let activating_source = null; let activating_source = null;
async function clickSource(src) { async function clickSource(src) {
activating_source = src.id; activating_source = src.id;
if (src.enabled) { try {
await src.deactivate(); if (src.enabled) {
await sources.refresh(); await src.deactivate();
} else { await sources.refresh();
await src.activate(); } else {
await sources.refresh(); await src.activate();
await sources.refresh();
}
} catch {
} }
activating_source = null; activating_source = null;
} }