mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-03 22:15:07 +08:00
parent
45cd4378bc
commit
2eb9f1a66e
1 changed files with 10 additions and 1 deletions
|
|
@ -222,7 +222,16 @@ class SimplePopup {
|
|||
}
|
||||
});
|
||||
|
||||
if (vals.some((v) => v === undefined || v === "")) {
|
||||
const inputsWithCurrentValue = [];
|
||||
for (let i = 0; i < this.inputs.length; i++) {
|
||||
inputsWithCurrentValue.push({ ...this.inputs[i], currentValue: vals[i] });
|
||||
}
|
||||
|
||||
if (
|
||||
inputsWithCurrentValue
|
||||
.filter((i) => !i.hidden)
|
||||
.some((v) => v.currentValue === undefined || v.currentValue === "")
|
||||
) {
|
||||
Notifications.add("Please fill in all fields", 0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue