fix(TestSubstep): don't show length of empty errors

This commit is contained in:
Ali BARIN
2022-11-05 02:41:55 +01:00
parent 927ceb6768
commit f11a4b8472

View File

@@ -93,7 +93,7 @@ function TestSubstep(props: TestSubstepProps): React.ReactElement {
/>
<Collapse in={expanded} timeout="auto" unmountOnExit>
<ListItem sx={{ pt: 2, pb: 3, flexDirection: 'column', alignItems: 'flex-start' }}>
{error?.graphQLErrors?.length && <Alert severity="error" sx={{ mb: 1, fontWeight: 500, width: '100%' }}>
{!!error?.graphQLErrors?.length && <Alert severity="error" sx={{ mb: 1, fontWeight: 500, width: '100%' }}>
{serializeErrors(error.graphQLErrors).map((error: any) => (<div>{error.message}</div>))}
</Alert>}