diff --git a/libs/modep.js b/libs/modep.js index e65cb64..b63d937 100644 --- a/libs/modep.js +++ b/libs/modep.js @@ -374,7 +374,7 @@ function hasControlMidiBindings(control) { } function isBypassed(control) { - return control.name === constants.CONTROL_BYPASS && control + return control.name === constants.CONTROL_BYPASS && control; } function isPedalBypassed(pedal) { @@ -426,8 +426,9 @@ async function toggleBypass(pedalId) { } return; } - const pedal = await getCurrentPedalById(pedalId); - const bypass = getBypassControlFromPedal(pedal); + // TODO: Cache aktualisieren mit An/Aus-Wert + let pedal = await getCurrentPedalById(pedalId); + let bypass = getBypassControlFromPedal(pedal); if (bypass.value === undefined || bypass.value === 0) { bypass.value = 0; } else {