Skip to content

Commit 33973ac

Browse files
silverwinddelvh
andauthored
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: #29862 --------- Co-authored-by: delvh <[email protected]>
1 parent 673286d commit 33973ac

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)