From d7e2f37a79302009ce66681dbd63ccf6312448e8 Mon Sep 17 00:00:00 2001 From: Marcel Kalai <57996611+m-kalai@users.noreply.github.com> Date: Wed, 4 Jan 2023 19:41:42 +0100 Subject: [PATCH] [FIX-149] Sanitise duration value (#150) 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);