From 7f3071336b45584ef7c107ea72b64e76705077c0 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Wed, 13 Jan 2021 23:50:36 +0100 Subject: [PATCH] check if new value is undefined --- htdocs/lib/Demodulator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/lib/Demodulator.js b/htdocs/lib/Demodulator.js index de6f3c5..8192a04 100644 --- a/htdocs/lib/Demodulator.js +++ b/htdocs/lib/Demodulator.js @@ -236,7 +236,7 @@ Demodulator.prototype.emit = function(event, params) { }; Demodulator.prototype.set_offset_frequency = function(to_what) { - if (to_what > bandwidth / 2 || to_what < -bandwidth / 2) return; + if (typeof(to_what) == 'undefined' || to_what > bandwidth / 2 || to_what < -bandwidth / 2) return; to_what = Math.round(to_what); if (this.offset_frequency === to_what) { return;