Skip to content

Commit

Permalink
fixed small bug due to invalid data from API
Browse files Browse the repository at this point in the history
  • Loading branch information
wscullen committed Aug 15, 2020
1 parent ea3fa8e commit 5718219
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/TileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,14 @@ class TileList extends Component<AppProps, DefaultAppState> {
const taskId = mostRecentJob.progressInfo.tile_ids[tile.id]
let taskStatusOverall = mostRecentJob.progressInfo.task_progress[taskId].progress
taskStatus["progress"] = taskStatusOverall[tile.properties.name]
taskStatus["status"] = taskStatus["progress"].status

console.warn(taskStatus)
if (taskStatus["progress"] && taskStatus["progress"].hasOwnProperty('status')) {
taskStatus["status"] = taskStatus["progress"].status
}
if (!mostRecentJob.success && mostRecentJob.status === JobStatus.Completed) {
taskStatus["status"] = TaskStatus.Failure
}
// console.warn(tile.properties)
// console.warn(taskId)
// console.warn(taskStatusOverall)
Expand Down

0 comments on commit 5718219

Please sign in to comment.