We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e90c136 commit 6acdf5aCopy full SHA for 6acdf5a
front/src/applications/stdcm/components/StdcmForm/StdcmConsist.tsx
@@ -72,8 +72,10 @@ const StdcmConsist = ({ disabled = false }: StdcmConfigCardProps) => {
72
}
73
}, [towedRollingStock]);
74
75
- const getLabel = (rs: LightRollingStockWithLiveries) =>
76
- `${rs.name} - ${rs.metadata?.series || rs.metadata?.reference || ''}`;
+ const getLabel = (rs: LightRollingStockWithLiveries) => {
+ const secondPart = rs.metadata?.series || rs.metadata?.reference || '';
77
+ return secondPart ? `${rs.name} - ${secondPart}` : rs.name;
78
+ };
79
80
const onInputClick = () => {
81
if (rollingStock?.id !== undefined) {
0 commit comments