Skip to content

Commit

Permalink
[FIX-149] Sanitise duration value (#150)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Kalai <[email protected]>
  • Loading branch information
m-kalai authored Jan 4, 2023
1 parent ec795ff commit d7e2f37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gantt-chart/public/components/gantt_chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function GanttChart({
const rawStartTime: number = getStartTime(document);
// subtract with start time of earliest trace to get relative start time
const startTime: number = rawStartTime - minStartTime;
const duration: number = _.get(document, visParams.durationField);
const duration: number = Number(_.get(document, visParams.durationField));
maxEndTime = Math.max(maxEndTime, rawStartTime + duration);

const label: string = _.get(document, visParams.labelField);
Expand Down

0 comments on commit d7e2f37

Please sign in to comment.