diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index 612c7522..4c50db71 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -101,12 +101,9 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingMod var modulation; if (mode.type === 'digimode') { - if (underlyingModulation) { - modulation = underlyingModulation - } else { - modulation = mode.underlying[0]; - } + modulation = underlyingModulation = underlyingModulation || mode.underlying[0]; } else { + underlyingModulation = undefined; modulation = mode.modulation; } @@ -147,7 +144,7 @@ DemodulatorPanel.prototype.setMode = function(requestedModulation, underlyingMod this.demodulator.start(); this.mode = mode; - this.underlyingModulation = modulation; + this.underlyingModulation = underlyingModulation; this.updateButtons(); this.updatePanels();