impr(custom text): not allowing empty custom text

This commit is contained in:
Miodec 2023-11-27 14:27:30 +00:00
parent 779ec58dab
commit 1d29929438

View file

@ -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, " ");