Don't submit empty strings

master
Edward Shen 2022-07-27 20:06:12 -07:00
parent 50e76ae3a0
commit 600d04eba9
Signed by: edward
GPG Key ID: 19182661E818369F
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ const PasteForm = () => {
const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {
event.preventDefault();
encrypt_string(value);
if (value.trim() !== "") {
encrypt_string(value);
}
}
return (