diff options
author | Giteabot <teabot@gitea.io> | 2024-04-30 20:53:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-30 20:53:20 +0800 |
commit | a75b0d281351526912c7c63295f7c5171617f053 (patch) | |
tree | 1ba8c3b51dcdb499cacc4cc4bb9ff7490ae9ea14 | |
parent | e8279fcefdbf986cefd03dbf024a66f3823991b0 (diff) | |
download | gitea-a75b0d281351526912c7c63295f7c5171617f053.tar.gz gitea-a75b0d281351526912c7c63295f7c5171617f053.zip |
Fix dashboard commit status null access (#30771) (#30786)
Backport #30771 by wxiaoguang
Fix #30768
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
-rw-r--r-- | web_src/js/components/DashboardRepoList.vue | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/components/DashboardRepoList.vue b/web_src/js/components/DashboardRepoList.vue index 2d980a1b18..8bce40ee79 100644 --- a/web_src/js/components/DashboardRepoList.vue +++ b/web_src/js/components/DashboardRepoList.vue @@ -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'); |