Skip to content

Commit 5f05e7b

Browse files
authored
Fix dashboard commit status null access (#30771)
Fix #30768
1 parent 610802d commit 5f05e7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web_src/js/components/DashboardRepoList.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ const sfc = {
251251
this.repos = json.data.map((webSearchRepo) => {
252252
return {
253253
...webSearchRepo.repository,
254-
latest_commit_status_state: webSearchRepo.latest_commit_status.State,
254+
latest_commit_status_state: webSearchRepo.latest_commit_status?.State, // if latest_commit_status is null, it means there is no commit status
255+
latest_commit_status_state_link: webSearchRepo.latest_commit_status?.TargetURL,
255256
locale_latest_commit_status_state: webSearchRepo.locale_latest_commit_status,
256-
latest_commit_status_state_link: webSearchRepo.latest_commit_status.TargetURL,
257257
};
258258
});
259259
const count = response.headers.get('X-Total-Count');

0 commit comments

Comments
 (0)