tirkarthi commented on code in PR #38374: URL: https://github.com/apache/airflow/pull/38374#discussion_r1534263531
########## airflow/www/static/js/dag/details/task/TaskDuration.tsx: ########## @@ -179,7 +170,18 @@ const TaskDuration = () => { // @ts-ignore dataset: { dimensions: ["runId", "queuedDurationUnit", "runDurationUnit"], - source: durations, + source: durations.map((duration) => { + if (duration) { + const durationInSeconds = duration as TaskInstanceDuration; Review Comment: I couldn't find the right way to convince typescript compiler here since duration is a union type of {} | TaskInstanceDuration. Neither checking for duration to be true in if clause nor using (duration as TaskInstanceDuration) / unitDivisor without a temporary variable. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org