mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-31 03:08:29 +08:00
parent
5b378cc606
commit
166ca6df6c
2 changed files with 2 additions and 2 deletions
|
|
@ -101,7 +101,7 @@ export function hide(): void {
|
|||
function apply(): void {
|
||||
const val = parseInput($("#customTestDurationPopup input").val() as string);
|
||||
|
||||
if (val !== null && !isNaN(val) && val >= 0) {
|
||||
if (val !== null && !isNaN(val) && val >= 0 && isFinite(val)) {
|
||||
UpdateConfig.setTimeConfig(val as MonkeyTypes.TimeModes);
|
||||
ManualRestart.set();
|
||||
TestLogic.restart();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export function hide(): void {
|
|||
function apply(): void {
|
||||
const val = parseInt($("#customWordAmountPopup input").val() as string);
|
||||
|
||||
if (val !== null && !isNaN(val) && val >= 0) {
|
||||
if (val !== null && !isNaN(val) && val >= 0 && isFinite(val)) {
|
||||
UpdateConfig.setWordCount(val as MonkeyTypes.WordsModes);
|
||||
ManualRestart.set();
|
||||
TestLogic.restart();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue