Skip to content

Commit 6821ad1

Browse files
viveknandavsnanda
andauthored
56058: Validating latestRun before accessing its properties (apache#56303)
* 56058: Checking for latestRun before invoking isStatePending * Fixed formatting --------- Co-authored-by: Vivek Nanda <vnanda@cloudera.com>
1 parent a753599 commit 6821ad1

File tree

1 file changed

+3
-1
lines changed
  • airflow-core/src/airflow/ui/src/pages/Dag

1 file changed

+3
-1
lines changed

airflow-core/src/airflow/ui/src/pages/Dag/Dag.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ export const Dag = () => {
108108
<DetailsLayout error={error ?? runsError} isLoading={isLoading || isLoadingRuns} tabs={displayTabs}>
109109
<Header
110110
dag={dag}
111-
isRefreshing={Boolean(isStatePending(latestRun?.state) && Boolean(refetchInterval))}
111+
isRefreshing={
112+
latestRun ? Boolean(isStatePending(latestRun.state) && Boolean(refetchInterval)) : false
113+
}
112114
latestRunInfo={latestRun ?? undefined}
113115
/>
114116
</DetailsLayout>

0 commit comments

Comments
 (0)