From a3ece750f3cbbad35fcb73d90c9e337a362e0a24 Mon Sep 17 00:00:00 2001 From: Luc Date: Mon, 1 Nov 2021 09:52:09 +0100 Subject: [PATCH] display 0 if undefined --- src/components/error.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/error.jsx b/src/components/error.jsx index cca671e..efcda1c 100644 --- a/src/components/error.jsx +++ b/src/components/error.jsx @@ -15,7 +15,7 @@ export const ErrorContainer = styled.div` ` const Error = ({ errorCount, lastError }) => { - const errorCountString = errorCount + ( errorCount === 1 ? " Error" : " Errors" ) + const errorCountString = (errorCount ? errorCount : 0) + ( errorCount === 1 ? " Error" : " Errors" ) const imageSource = errorCount > 0 ? ErrorCircle : CheckCircle