diff --git a/src/drawApp/graphics/TrainInteraction.ts b/src/drawApp/graphics/TrainInteraction.ts index d3d798c..1e0c3fc 100644 --- a/src/drawApp/graphics/TrainInteraction.ts +++ b/src/drawApp/graphics/TrainInteraction.ts @@ -607,25 +607,25 @@ export class TrainState extends GraphicStateBase implements ITrainState { this.states.tailOffset = v; } get dataSerialNumber(): number { - return this.states.btmState.dataSerialNumber; + return this.states.btmState?.dataSerialNumber; } set dataSerialNumber(v: number) { this.states.btmState.dataSerialNumber = v; } get baliseCount(): number { - return this.states.btmState.baliseCount; + return this.states.btmState?.baliseCount; } set baliseCount(v: number) { this.states.btmState.baliseCount = v; } get messageCounter(): number { - return this.states.btmState.messageCounter; + return this.states.btmState?.messageCounter; } set messageCounter(v: number) { this.states.btmState.messageCounter = v; } get telegram(): string { - return this.states.btmState.telegram; + return this.states.btmState?.telegram; } set telegram(v: string) { this.states.btmState.telegram = v;