diff --git a/src/diagrams/gantt/ganttDb.js b/src/diagrams/gantt/ganttDb.js index 8c70d9c70..e831601dc 100644 --- a/src/diagrams/gantt/ganttDb.js +++ b/src/diagrams/gantt/ganttDb.js @@ -74,19 +74,16 @@ const isInvalidDate = function (date, dateFormat, excludes) { } const fixTaskDates = function (task, dateFormat, excludes) { - if (! excludes.length || task.manualEndTime) return; - + if (!excludes.length || task.manualEndTime) return let startTime = moment(task.startTime) startTime.add(1, 'd') let endTime = moment(task.endTime) - while (startTime.date() <= endTime.date()) { if (isInvalidDate(startTime, dateFormat, excludes)) { endTime.add(1, 'd') } startTime.add(1, 'd') } - task.endTime = endTime.toDate() }