*/
import { HelperText, Select } from '@sonarsource/echoes-react';
-import { isEmpty } from 'lodash';
+import { isEmpty, isUndefined } from 'lodash';
import { FormattedMessage, useIntl } from 'react-intl';
import SoftwareImpactSeverityIcon from '../../../components/icon-mappers/SoftwareImpactSeverityIcon';
import { SEVERITIES } from '../../../helpers/constants';
impactSeverity?: boolean;
isDisabled: boolean;
onChange: (value: string) => void;
- recommendedSeverity: string;
+ recommendedSeverity?: string;
severity: string;
}
value={severity}
valueIcon={<SoftwareImpactSeverityIcon severity={severity} aria-hidden />}
/>
- {severity !== recommendedSeverity && (
+ {severity !== recommendedSeverity && !isUndefined(recommendedSeverity) && (
<HelperText className="sw-mt-2">
<FormattedMessage
id="coding_rules.custom_severity.not_recommended"