parsing to int before running the rest of the function

This commit is contained in:
Miodec 2022-02-04 12:34:43 +01:00
parent 69da49d71a
commit 88a293a7e1

View file

@ -494,7 +494,8 @@ export function setPaceCaret(val, nosave) {
}
export function setPaceCaretCustomSpeed(val, nosave) {
if (val == undefined || Number.isNaN(parseInt(val))) {
val = parseInt(val);
if (val == undefined || Number.isNaN(val)) {
val = 100;
}
config.paceCaretCustomSpeed = val;
@ -530,7 +531,8 @@ export function setMinWpm(minwpm, nosave) {
}
export function setMinWpmCustomSpeed(val, nosave) {
if (val == undefined || Number.isNaN(parseInt(val))) {
val = parseInt(val);
if (val == undefined || Number.isNaN(val)) {
val = 100;
}
config.minWpmCustomSpeed = val;
@ -566,7 +568,8 @@ export function setMinBurst(min, nosave) {
}
export function setMinBurstCustomSpeed(val, nosave) {
if (val == undefined || Number.isNaN(parseInt(val))) {
val = parseInt(val);
if (val == undefined || Number.isNaN(val)) {
val = 100;
}
config.minBurstCustomSpeed = val;