非空判断调整

This commit is contained in:
joylink_fanyuhong 2024-02-20 17:42:49 +08:00
parent f9782c1227
commit 8540e68711

View File

@ -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;