From cd5fd9a8b6eaae645b4ee5ca282beca4990c56e0 Mon Sep 17 00:00:00 2001 From: Samuel Yeung Date: Fri, 24 Sep 2021 13:19:33 -0400 Subject: [PATCH] check error message for null or empty as well in addition to undefined --- components/Form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Form.tsx b/components/Form.tsx index b09a37b..f112734 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -77,7 +77,7 @@ function Form(): JSX.Element { // Check if there is a translation and replace message accordingly const setErrorMessage = (message: string) => { - if (message == undefined) { + if (!message) { return; }