mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-09 13:44:29 +08:00
impr(custom text): not allowing empty custom text
This commit is contained in:
parent
779ec58dab
commit
1d29929438
1 changed files with 5 additions and 0 deletions
|
|
@ -227,6 +227,11 @@ $(`${popup} .randomInputFields .sectioncount input`).on("keypress", () => {
|
|||
function apply(): void {
|
||||
let text = ($(`${popup} textarea`).val() as string).normalize();
|
||||
|
||||
if (text === "") {
|
||||
Notifications.add("Text cannot be empty", 0);
|
||||
return;
|
||||
}
|
||||
|
||||
text = text.trim();
|
||||
// text = text.replace(/[\r]/gm, " ");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue