fix null ref (#271)
This commit is contained in:
Родитель
3035d299af
Коммит
1bd87c571a
|
@ -100,11 +100,16 @@ export default class DeviceInterfaces extends React.Component<DeviceInterfacePro
|
|||
);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line: cyclomatic-complexity
|
||||
private readonly renderInterfaceInfoDetail = (context: LocalizationContextInterface) => {
|
||||
const { modelDefinitionWithSource } = this.props;
|
||||
const source = this.getModelDefinitionSourceText(context);
|
||||
const displayName = modelDefinitionWithSource.payload && getLocalizedData(modelDefinitionWithSource.payload.modelDefinition.displayName) || '--';
|
||||
const description = modelDefinitionWithSource.payload && getLocalizedData(modelDefinitionWithSource.payload.modelDefinition.description) || '--';
|
||||
const displayName = modelDefinitionWithSource.payload &&
|
||||
modelDefinitionWithSource.payload.modelDefinition &&
|
||||
getLocalizedData(modelDefinitionWithSource.payload.modelDefinition.displayName) || '--';
|
||||
const description = modelDefinitionWithSource.payload &&
|
||||
modelDefinitionWithSource.payload.modelDefinition &&
|
||||
getLocalizedData(modelDefinitionWithSource.payload.modelDefinition.description) || '--';
|
||||
return (
|
||||
<>
|
||||
<Label className="source"> {context.t(ResourceKeys.deviceInterfaces.columns.source)}: {source}</Label>
|
||||
|
|
Загрузка…
Ссылка в новой задаче