Skip to content

Commit 6416b06

Browse files
cleaning according to sonarqube
1 parent cafc366 commit 6416b06

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/chart/graph/component/GraphEntityInspectionTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const GraphEntityInspectionTable = ({
9191
{key}
9292
</TableCell>
9393
<TableCell align={'left'} style={{ color: tableTextColor }}>
94-
<ShowMoreText lines={2}>{formatProperty(entity && entity.properties[key])}</ShowMoreText>
94+
<ShowMoreText lines={2}>{formatProperty(entity?.properties[key])}</ShowMoreText>
9595
</TableCell>
9696
{checklistEnabled ? (
9797
<TableCell align={'center'}>

src/chart/table/TableChart.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { ThemeProvider, createTheme } from '@mui/material/styles';
2323
import Button from '@mui/material/Button';
2424
import { extensionEnabled } from '../../utils/ReportUtils';
2525
import { getCheckboxes, hasCheckboxes, updateCheckBoxes } from './TableActionsHelper';
26-
import DOMPurify from 'dompurify';
2726

2827
const TABLE_HEADER_HEIGHT = 32;
2928
const TABLE_FOOTER_HEIGHT = 62;
@@ -45,7 +44,7 @@ function htmlToPlainText(html): string {
4544
// Set the HTML content directly as innerHTML of the temporary element
4645
tempElement.innerHTML = html.props.dangerouslySetInnerHTML.__html;
4746
// Extract plain text using textContent
48-
return tempElement.textContent || '';
47+
return tempElement.textContent ?? '';
4948
}
5049

5150
function renderAsButtonWrapper(renderer) {

0 commit comments

Comments
 (0)