mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
parsing to int before running the rest of the function
This commit is contained in:
parent
69da49d71a
commit
88a293a7e1
1 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue