Skip to content

Commit

Permalink
Fix dashboard commit status null access (#30771)
Browse files Browse the repository at this point in the history
Fix #30768
  • Loading branch information
wxiaoguang authored Apr 30, 2024
1 parent 610802d commit 5f05e7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web_src/js/components/DashboardRepoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ const sfc = {
this.repos = json.data.map((webSearchRepo) => {
return {
...webSearchRepo.repository,
latest_commit_status_state: webSearchRepo.latest_commit_status.State,
latest_commit_status_state: webSearchRepo.latest_commit_status?.State, // if latest_commit_status is null, it means there is no commit status
latest_commit_status_state_link: webSearchRepo.latest_commit_status?.TargetURL,
locale_latest_commit_status_state: webSearchRepo.locale_latest_commit_status,
latest_commit_status_state_link: webSearchRepo.latest_commit_status.TargetURL,
};
});
const count = response.headers.get('X-Total-Count');
Expand Down

0 comments on commit 5f05e7b

Please sign in to comment.