mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-05 06:25:19 +00:00
fix empty input
This commit is contained in:
parent
71acad3b4f
commit
e787336fc4
1 changed files with 5 additions and 2 deletions
|
|
@ -30,7 +30,10 @@ $.fn.frequencyInput = function() {
|
|||
$exponent.on('change', setExponent);
|
||||
|
||||
// calculate initial exponent
|
||||
$exponent.val(Math.floor(Math.log10($input.val()) / 3) * 3);
|
||||
setExponent();
|
||||
var value = parseFloat($input.val());
|
||||
if (!Number.isNaN(value)) {
|
||||
$exponent.val(Math.floor(Math.log10(value) / 3) * 3);
|
||||
setExponent();
|
||||
}
|
||||
})
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue