RoyLee1224 commented on code in PR #50416:
URL: https://github.com/apache/airflow/pull/50416#discussion_r2083135759
##########
airflow-core/src/airflow/ui/src/components/DurationChart.tsx:
##########
@@ -141,6 +145,24 @@ export const DurationChart = ({
}}
datasetIdKey="id"
options={{
+ onClick: (_event, elements) => {
+ const [element] = elements;
+
+ if (element && typeof element.index === "number") {
Review Comment:
You're right, I thought we needed the type assertion for edge cases like
clicking annotations, but I now understand that clicking an annotation doesn't
provide an element.
I'll remove it, thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]