From 1c3d555cc92104a34b63bfaa404ba2474ed945d6 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Fri, 1 Nov 2024 15:44:57 +0100 Subject: [PATCH 1/2] Fix Try Selector in Mapped Tasks also on Index 0 --- airflow/www/static/js/api/useTIHistory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/static/js/api/useTIHistory.ts b/airflow/www/static/js/api/useTIHistory.ts index d90ce91f030db..e111fb47d95d2 100644 --- a/airflow/www/static/js/api/useTIHistory.ts +++ b/airflow/www/static/js/api/useTIHistory.ts @@ -48,7 +48,7 @@ export default function useTIHistory({ .replace("_DAG_RUN_ID_", dagRunId) .replace("_TASK_ID_", taskId); - if (mapIndex && mapIndex > -1) { + if (typeof mapIndex !== "undefined" && mapIndex > -1) { tiHistoryUrl = tiHistoryUrl.replace("/tries", `/${mapIndex}/tries`); } From 24c13823b73f98c0725dd4b13c20a4352d05f9fc Mon Sep 17 00:00:00 2001 From: Jens Scheffler <95105677+jscheffl@users.noreply.github.com> Date: Fri, 1 Nov 2024 18:14:13 +0100 Subject: [PATCH 2/2] Review Feedback, direct commit Co-authored-by: Brent Bovenzi --- airflow/www/static/js/api/useTIHistory.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow/www/static/js/api/useTIHistory.ts b/airflow/www/static/js/api/useTIHistory.ts index e111fb47d95d2..1d1ee1d40f586 100644 --- a/airflow/www/static/js/api/useTIHistory.ts +++ b/airflow/www/static/js/api/useTIHistory.ts @@ -48,7 +48,7 @@ export default function useTIHistory({ .replace("_DAG_RUN_ID_", dagRunId) .replace("_TASK_ID_", taskId); - if (typeof mapIndex !== "undefined" && mapIndex > -1) { + if (mapIndex !== undefined && mapIndex > -1) { tiHistoryUrl = tiHistoryUrl.replace("/tries", `/${mapIndex}/tries`); }