From 2ee5bedf79e5212198903f014ef1be5c5103a985 Mon Sep 17 00:00:00 2001 From: velvettear Date: Thu, 24 Mar 2022 15:28:34 +0100 Subject: [PATCH] added todo --- libs/modep.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 {