This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3715e9e135 fix(graph/index): prevent reading properties of undefined
(reading 'id') (#41335)
3715e9e135 is described below
commit 3715e9e135d6a000a9e47a96354c810813b17425
Author: Josix <[email protected]>
AuthorDate: Thu Aug 8 23:56:57 2024 +0800
fix(graph/index): prevent reading properties of undefined (reading 'id')
(#41335)
---
airflow/www/static/js/dag/details/graph/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow/www/static/js/dag/details/graph/index.tsx
b/airflow/www/static/js/dag/details/graph/index.tsx
index 92eefdd302..51dd20d88b 100644
--- a/airflow/www/static/js/dag/details/graph/index.tsx
+++ b/airflow/www/static/js/dag/details/graph/index.tsx
@@ -160,7 +160,7 @@ const Graph = ({ openGroupIds, onToggleGroups,
hoveredTaskState }: Props) => {
const { nodes: upstreamDatasetNodes, edges: upstreamDatasetEdges } =
getUpstreamDatasets(
dagDetails.datasetExpression as DatasetExpression,
- data?.nodes?.children ? data.nodes.children[0].id : ""
+ data?.nodes?.children?.[0]?.id ?? ""
);
const {