Skip to content

Commit

Permalink
4.4 fix log whitescreen
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinandan13jan committed Sep 9, 2020
1 parent 0810050 commit 783b8d9
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -51,15 +51,15 @@ class PipelineRunLogs extends React.Component<PipelineRunLogsProps, PipelineRunL
getSortedTaskRun = (taskRunFromYaml) => {
const taskRuns = Object.keys(taskRunFromYaml).sort((a, b) => {
if (_.get(taskRunFromYaml, [a, 'status', 'completionTime'], false)) {
return taskRunFromYaml[b].status.completionTime &&
return taskRunFromYaml[b].status?.completionTime &&
new Date(taskRunFromYaml[a].status.completionTime) >
new Date(taskRunFromYaml[b].status.completionTime)
? 1
: -1;
}
return taskRunFromYaml[b].status.completionTime ||
new Date(taskRunFromYaml[a].status.startTime) >
new Date(taskRunFromYaml[b].status.startTime)
return taskRunFromYaml[b].status?.completionTime ||
new Date(taskRunFromYaml[a].status?.startTime) >
new Date(taskRunFromYaml[b].status?.startTime)
? 1
: -1;
});
Expand Down

0 comments on commit 783b8d9

Please sign in to comment.