Skip to content

Commit 907f895

Browse files
committed
Sometimes car is null apparently...
1 parent 9980418 commit 907f895

File tree

1 file changed

+1
-1
lines changed
  • src/modules/analysis/components/strategy/components

1 file changed

+1
-1
lines changed

src/modules/analysis/components/strategy/components/StintBox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const Text = styled.div`
7676
export const StintBox = animated(
7777
({ height, onClick, stint, width, x }) => {
7878

79-
const laps = stint.inProgress ? stint.car.currentLap - stint.startLap : stint.durationLaps;
79+
const laps = (stint.inProgress && stint.car) ? stint.car.currentLap - stint.startLap : stint.durationLaps;
8080

8181
const best = stint.bestLap;
8282
const mean = stint.meanLap;

0 commit comments

Comments
 (0)