Skip to content

Commit

Permalink
front: only compute margins if theoretical margin given in timestop t…
Browse files Browse the repository at this point in the history
…ables

Signed-off-by: Alice Khoudli <[email protected]>
  • Loading branch information
Synar committed Oct 17, 2024
1 parent 652024e commit 523825d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions front/src/modules/timesStops/helpers/computeMargins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ function computeMargins(
pathStepId: string
) {
const theoreticalMargin = getTheoreticalMargin(selectedTrainSchedule, pathStepId);
// We only compute margins if a margin was specified
if (theoreticalMargin === undefined) return undefined;

// durations to go from current scheduled point to next scheduled point.
// base = no margin
Expand Down

0 comments on commit 523825d

Please sign in to comment.