Skip to content

Commit 319bc90

Browse files
fix(ui): guard against null/undefined dates in Gantt chart to prevent RangeError (#64031) (#64489)
* fix(ui): guard against null/undefined dates in Gantt chart to prevent RangeError Closes: #63954 * Fix strict-boolean-expressions lint error in Gantt utils (cherry picked from commit 92255b5) Co-authored-by: Idris Akorede Ibrahim <idrisakoredeibrahim@gmail.com>
1 parent 542a30f commit 319bc90

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • airflow-core/src/airflow/ui/src/layouts/Details/Gantt

airflow-core/src/airflow/ui/src/layouts/Details/Gantt/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ export const transformGanttData = ({
124124
.filter((tryInstance) => tryInstance.start_date !== null)
125125
.map((tryInstance) => {
126126
const hasTaskRunning = isStatePending(tryInstance.state);
127-
const endTime = hasTaskRunning ? dayjs().toISOString() : tryInstance.end_date;
127+
const endTime =
128+
hasTaskRunning || tryInstance.end_date === null
129+
? dayjs().toISOString()
130+
: tryInstance.end_date;
128131

129132
return {
130133
isGroup: false,

0 commit comments

Comments
 (0)