fix(ui): list view crash when using a code field type (#7994)

This commit is contained in:
Paul
2024-08-30 12:47:33 -06:00
committed by GitHub
parent 7f6b0f087f
commit e25730f95c

View File

@@ -10,7 +10,7 @@ export interface CodeCellProps extends DefaultCellComponentProps<string, CodeFie
} }
export const CodeCell: React.FC<CodeCellProps> = ({ cellData, nowrap }) => { export const CodeCell: React.FC<CodeCellProps> = ({ cellData, nowrap }) => {
const textToShow = cellData.length > 100 ? `${cellData.substring(0, 100)}\u2026` : cellData const textToShow = cellData?.length > 100 ? `${cellData.substring(0, 100)}\u2026` : cellData
const noWrapStyle: React.CSSProperties = nowrap ? { whiteSpace: 'nowrap' } : {} const noWrapStyle: React.CSSProperties = nowrap ? { whiteSpace: 'nowrap' } : {}