Skip to content

Commit

Permalink
Fix dashboard commit status null access (#30771) (#30786)
Browse files Browse the repository at this point in the history
Backport #30771 by wxiaoguang

Fix #30768

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
  • Loading branch information
GiteaBot and wxiaoguang authored Apr 30, 2024
1 parent e8279fc commit a75b0d2
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 a75b0d2

Please sign in to comment.