display 0 if undefined

This commit is contained in:
Luc 2021-11-01 09:52:09 +01:00
parent 4b9e09673e
commit a3ece750f3

View File

@ -15,7 +15,7 @@ export const ErrorContainer = styled.div`
` `
const Error = ({ errorCount, lastError }) => { 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 const imageSource = errorCount > 0 ? ErrorCircle : CheckCircle