From f962b4f68d83c39276c79a0d9171edd5326cc67c Mon Sep 17 00:00:00 2001 From: Marcel Kalai Date: Tue, 3 Jan 2023 17:30:29 +0100 Subject: [PATCH] [FIX-149] Sanitise duration value Signed-off-by: Marcel Kalai --- gantt-chart/public/components/gantt_chart.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gantt-chart/public/components/gantt_chart.tsx b/gantt-chart/public/components/gantt_chart.tsx index e193185..14d41af 100644 --- a/gantt-chart/public/components/gantt_chart.tsx +++ b/gantt-chart/public/components/gantt_chart.tsx @@ -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);