From 600d04eba908f4f580972b9ecd7faffc264443b1 Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Wed, 27 Jul 2022 20:06:12 -0700 Subject: [PATCH] Don't submit empty strings --- web/src/render.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/render.tsx b/web/src/render.tsx index c508412..dcbf663 100644 --- a/web/src/render.tsx +++ b/web/src/render.tsx @@ -47,7 +47,9 @@ const PasteForm = () => { const handleSubmit = (event: React.FormEvent) => { event.preventDefault(); - encrypt_string(value); + if (value.trim() !== "") { + encrypt_string(value); + } } return (