diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx index 2d1acb1585b98..649aeaf3dc724 100644 --- a/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx +++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx @@ -54,7 +54,7 @@ const TooltipSection = ({ ); export const isLabelTruncated = (labelRef?: React.RefObject): boolean => - !!(labelRef?.current?.scrollWidth > labelRef?.current.clientWidth); + !!(labelRef?.current?.scrollWidth > labelRef?.current?.clientWidth); export const getColumnLabelText = (column: ColumnMeta): string => column.verbose_name || column.column_name; diff --git a/superset-frontend/src/components/Datasource/CollectionTable.tsx b/superset-frontend/src/components/Datasource/CollectionTable.tsx index b909609837cb8..baa53264c719f 100644 --- a/superset-frontend/src/components/Datasource/CollectionTable.tsx +++ b/superset-frontend/src/components/Datasource/CollectionTable.tsx @@ -350,7 +350,7 @@ export default class CRUDCollection extends React.PureComponent< } renderCell(record: any, col: any) { - const renderer = this?.props?.itemRenderers?.[col]; + const renderer = this.props.itemRenderers?.[col]; const val = record[col]; const onChange = this.onCellChange.bind(this, record.id, col); return renderer ? renderer(val, onChange, this.getLabel(col), record) : val; diff --git a/superset-frontend/src/preamble.ts b/superset-frontend/src/preamble.ts index 374ee34fba824..f8840ed22bdf8 100644 --- a/superset-frontend/src/preamble.ts +++ b/superset-frontend/src/preamble.ts @@ -52,7 +52,7 @@ if (typeof window !== 'undefined') { bootstrapData = root ? JSON.parse(root.getAttribute('data-bootstrap') || '{}') : {}; - if (bootstrapData?.common.language_pack) { + if (bootstrapData?.common?.language_pack) { const languagePack = bootstrapData.common.language_pack; configure({ languagePack }); moment.locale(bootstrapData.common.locale);