Skip to content

Commit 003d860

Browse files
silverwinddelvh
authored andcommitted
Avoid JS error on issue/pr list when logged out (#29854)
When logged out, the checkboxes are not there on the issue/pr lists, which would cause an error here. Fixes: go-gitea/gitea#29862 --------- Co-authored-by: delvh <[email protected]> (cherry picked from commit 33973ac567d6681bda26d82f26b7294a297c693f)
1 parent 2141bc3 commit 003d860

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

web_src/js/features/repo-issue-list.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {DELETE, POST} from '../modules/fetch.js';
99

1010
function initRepoIssueListCheckboxes() {
1111
const issueSelectAll = document.querySelector('.issue-checkbox-all');
12+
if (!issueSelectAll) return; // logged out state
1213
const issueCheckboxes = document.querySelectorAll('.issue-checkbox');
1314

1415
const syncIssueSelectionState = () => {

0 commit comments

Comments
 (0)