判定ミスを修正
This commit is contained in:
parent
1a10bee3c8
commit
2e5f53c46b
@ -1,7 +1,7 @@
|
||||
type getTrainDelayStatus = (
|
||||
current: { delay: string; Pos: string },
|
||||
current: { delay: number | "入線" | string; Pos: string },
|
||||
Station_JP: string
|
||||
) => string;
|
||||
) => string | number;
|
||||
export const getTrainDelayStatus: getTrainDelayStatus = (
|
||||
current,
|
||||
Station_JP
|
||||
@ -17,7 +17,7 @@ export const getTrainDelayStatus: getTrainDelayStatus = (
|
||||
}
|
||||
case Number.isNaN(delay):
|
||||
return delay;
|
||||
case delay === "0":
|
||||
case delay === 0:
|
||||
return "定刻通り";
|
||||
default:
|
||||
return delay + "分遅れ";
|
||||
|
Loading…
Reference in New Issue
Block a user