Don't submit empty strings

This commit is contained in:
Edward Shen 2022-07-27 20:06:12 -07:00
parent 50e76ae3a0
commit 600d04eba9
Signed by: edward
GPG key ID: 19182661E818369F

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 (