From 7fbd024ed5ba5eec3d7f2c1ae1ea62ee5cb652e7 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Wed, 6 May 2020 22:52:48 +0200 Subject: [PATCH] fix sql=0 parameter --- htdocs/lib/DemodulatorPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js index bab7c02..a0506a1 100644 --- a/htdocs/lib/DemodulatorPanel.js +++ b/htdocs/lib/DemodulatorPanel.js @@ -212,7 +212,7 @@ DemodulatorPanel.prototype.transformHashParams = function(params) { mod: params.secondary_mod || params.mod }; if (params.offset_frequency) ret.offset_frequency = params.offset_frequency; - if (params.sql) ret.squelch_level = parseInt(params.sql); + if (typeof(params.sql) !== 'undefined') ret.squelch_level = parseInt(params.sql); return ret; }; @@ -299,7 +299,7 @@ DemodulatorPanel.prototype.updateHash = function() { secondary_mod: demod.get_secondary_demod(), sql: demod.getSquelch(), }, function(value, key){ - if (!value) return undefined; + if (typeof(value) === 'undefined') return undefined; return key + '=' + value; }).filter(function(v) { return !!v;